qpcpp/ports/lint-plus/qpcpp.lnt

460 lines
9.1 KiB
Plaintext
Raw Normal View History

//============================================================================
// QP/C++ Real-Time Embedded Framework (RTEF)
// Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
//
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
//
// This software is dual-licensed under the terms of the open source GNU
// General Public License version 3 (or any later version), or alternatively,
// under the terms of one of the closed source Quantum Leaps commercial
// licenses.
//
// The terms of the open source GNU General Public License version 3
// can be found at: <www.gnu.org/licenses/gpl-3.0>
//
// The terms of the closed source Quantum Leaps commercial licenses
// can be found at: <www.state-machine.com/licensing>
//
// Redistributions in source code must retain this top-level comment block.
// Plagiarizing this software to sidestep the license obligations is illegal.
//
// Contact information:
// <www.state-machine.com>
// <info@state-machine.com>
//============================================================================
//! @date Last updated on: 2024-02-18
//! @version Last updated for version: 7.3.3
//!
//! @file
//! @brief PC-Lint-Plus option file for linting QP/C++ __Applications__
2019-12-31 15:56:23 -05:00
//----------------------------------------------------------------------------
2024-01-17 07:50:09 -05:00
// globally suppress the following warnings:
-e546 // explicitly taking address of function
-e717 // monocarpic do-while used to group statements
-e1756 // variable has 'static' storage duration and non-POD type
-e3412 // class has virtual functions but non-virtual destructor
2022-08-11 15:36:19 -04:00
2019-12-31 15:56:23 -05:00
// Assertions ----------------------------------------------------------------
// give Q_onError() the semantics of "exit"
2019-12-31 15:56:23 -05:00
-function(exit,
Q_onError)
2019-12-31 15:56:23 -05:00
2020-03-17 21:33:58 -04:00
// C-style array type [AUTOSAR Rule A18-1-1]
-esym(9436,
QP::versionStr)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
2024-06-12 16:30:04 -04:00
Q_THIS_MODULE,
Q_THIS_FILE,
Q_ASSERT_STATIC,
2019-12-31 15:56:23 -05:00
Q_ASSERT,
Q_ASSERT_ID,
Q_ERROR,
Q_ERROR_ID,
Q_REQUIRE,
Q_REQUIRE_ID,
Q_ENSURE,
Q_ENSURE_ID,
Q_INVARIANT,
Q_INVARIANT_ID,
Q_DIM)
2019-12-31 15:56:23 -05:00
2020-07-18 17:58:58 -04:00
// use of c-style cast to void [AS-A5-2-2]
-emacro(1954,
Q_ASSERT,
Q_ASSERT_ID,
Q_ERROR,
Q_ERROR_ID,
Q_REQUIRE,
Q_REQUIRE_ID,
Q_ENSURE,
Q_ENSURE_ID,
Q_INVARIANT,
Q_INVARIANT_ID,
Q_ASSERT_INCRIT)
2020-07-18 17:58:58 -04:00
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
2019-12-31 15:56:23 -05:00
-esym(9022,
2024-06-12 16:30:04 -04:00
Q_THIS_MODULE)
2019-12-31 15:56:23 -05:00
// definition of macro ends in semi-colon
-esym(823,
Q_DEFINE_THIS_FILE,
Q_DEFINE_THIS_MODULE)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
2022-08-11 15:36:19 -04:00
Q_UNUSED_PAR,
2019-12-31 15:56:23 -05:00
Q_DIM,
Q_UINT2PTR_CAST,
Q_UINTPTR_CAST_)
2019-12-31 15:56:23 -05:00
// MC++R5-2-4 use of c-style cast
-emacro(1924,
Q_ASSERT,
Q_ASSERT_ID,
Q_ERROR,
Q_ERROR_ID)
2019-12-31 15:56:23 -05:00
// QEP -----------------------------------------------------------------------
// MC++R7-3-1 global declaration of symbol
-esym(9141,
char_t,
int_t,
enum_t,
float32_t,
float64_t)
// AUTOSAR Rule A3-3-2 non-private data member within a non-POD structure
// NOTE: public access needed for extern "C" functions
-esym(9150,
QP::QAsmAttr::*,
QP::QAsm::*)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
INIT,
DISPATCH,
2019-12-31 15:56:23 -05:00
Q_STATE_DECL,
Q_STATE_DEF,
QM_STATE_DECL,
QM_STATE_DEF,
QM_SM_STATE_DECL,
QM_ACTION_DECL,
QM_ACTION_DEF,
QHSM_INIT,
QHSM_DISPATCH,
Q_TRAN,
Q_TRAN_HIST,
Q_SUPER,
Q_HANDLED,
Q_UNHANDLED,
QM_ENTRY,
QM_EXIT,
QM_SM_EXIT,
QM_TRAN,
QM_TRAN_INIT,
QM_TRAN_HIST,
QM_TRAN_EP,
QM_TRAN_XP,
QM_SUPER,
QM_SUPER_SUB,
QM_HANDLED,
QM_UNHANDLED,
Q_HSM_UPCAST,
Q_EVT_CAST,
Q_STATE_CAST,
Q_UINT2PTR_CAST)
2019-12-31 15:56:23 -05:00
// MC++R5-2-8 conversion from pointer to other pointer type
-emacro(9079,
Q_EVT_CAST)
// MC++R5-2-2 casting from base class 'QP::QEvt' to derived class
-emacro(1939,
Q_EVT_CAST)
// MC++R10-0-6 unparenthesized macro parameter 'class_' in definition of macro
-esym(9022,
Q_EVT_CAST,
Q_UINT2PTR_CAST,
Q_STATE_DECL,
Q_STATE_DEF,
QM_STATE_DECL,
QM_STATE_DEF,
QM_SM_STATE_DECL,
QM_ACTION_DECL,
QM_ACTION_DEF,
QEP_TRIG_,
QEP_ENTER_,
QEP_EXIT_)
// MC++16-3-1 multiple use of stringize/pasting operators in definition of macro
-esym(9023,
Q_STATE_DECL,
Q_STATE_DEF,
QM_STATE_DECL,
QM_STATE_DEF,
QM_SM_STATE_DECL,
QM_ACTION_DEF)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 stringize operator used in definition of function-like macro
2019-12-31 15:56:23 -05:00
-esym(9024,
Q_STATE_DECL,
Q_STATE_DEF,
QM_STATE_DECL,
QM_STATE_DEF,
QM_SM_STATE_DECL,
QM_ACTION_DECL,
QM_ACTION_DEF)
// MC++R5-2-8 conversion from pointer to void to other pointer type
-emacro(9079,
Q_STATE_DEF,
QM_STATE_DEF,
QM_ACTION_DEF)
// MC++R9-3-3 member function could be made const
-emacro(1762,
Q_STATE_DEF,
QM_STATE_DEF)
// MC++9-5-1 union declared
-esym(9018,
QP::QAsmAttr)
2019-12-31 15:56:23 -05:00
// MC++5-2-8 conversion from integer type (0) to pointer type
-emacro(9010,
Q_STATE_CAST)
2019-12-31 15:56:23 -05:00
// public virtual function 'QP::QHsm::...'
-esym(1731,
QP::QHsm::*,
QP::QMsm::*)
// QF ------------------------------------------------------------------------
// AUTOSAR Rule A3-3-2 non-private data member within a non-POD structure
// NOTE: public access needed for extern "C" functions
-esym(9150,
QP::QF::QF_Attr::*)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
POST,
POST_X,
PUBLISH,
TICK_X,
TICK,
TRIG,
2019-12-31 15:56:23 -05:00
QF_INT_DISABLE,
QF_INT_ENABLE,
QF_CRIT_EXIT_NOP,
QF_LOG2,
2022-08-28 22:12:27 -04:00
Q_PRIO,
2019-12-31 15:56:23 -05:00
Q_NEW,
Q_NEW_X,
Q_NEW_REF,
Q_DELETE_REF,
QF_INT_DISABLE,
QF_INT_ENABLE,
QF_MPOOL_EL)
// MC++R0-3-2 ignoring return value of function
-emacro(534,
POST)
2022-09-22 11:13:20 -04:00
// [AUTOSAR Rule M17-0-2] the name xxx is reserved to the compiler
2022-08-28 22:12:27 -04:00
-esym(9093,
2024-01-17 07:50:09 -05:00
remove) // QPrioSet::remove()
2022-08-28 22:12:27 -04:00
2019-12-31 15:56:23 -05:00
// MC++R5-2-7 pointer type converted to unrelated pointer type
-emacro(9176,
QF_QMACTIVE_TO_QMSM_CAST_,
QF_QMACTIVE_TO_QMSM_CONST_CAST_)
// MC++R5-2-2 casting from base class 'QP::QEvt' to derived class
-emacro(1939,
Q_NEW,
Q_NEW_X)
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
-esym(9022,
Q_NEW,
Q_NEW_X,
Q_NEW_REF)
// QK ------------------------------------------------------------------------
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
QK_ISR_ENTRY,
QK_ISR_EXIT)
// AC++M7-3-1 global declaration of symbol
2019-12-31 15:56:23 -05:00
-esym(9141,
QK_Attr)
// MC++R11-0-1 non-private data member within a non-POD structure
// NOTE: public access needed for extern "C" functions
-esym(9150,
QK_Attr::*)
// QXK -----------------------------------------------------------------------
// MC++R16-0-4 function-like macro
-esym(9026,
QXK_ISR_ENTRY,
QXK_ISR_EXIT,
QXK_TLS)
// MC++R7-3-1 global declaration of symbol
-esym(9141,
QXK_Attr)
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
-esym(9022,
QXK_TLS)
// MC++R5-2-8 conversion from pointer to void to other pointer type
-emacro(9079,
QXK_PTR_CAST_)
2022-08-11 15:36:19 -04:00
// MC++R5-2-2 casting from base class to derived class
2019-12-31 15:56:23 -05:00
-emacro(1939,
QXTHREAD_CAST_)
2022-08-11 15:36:19 -04:00
// MC++R5-2-3 downcast of polymorphic type
2019-12-31 15:56:23 -05:00
-emacro(9171,
QXTHREAD_CAST_)
2022-08-28 22:12:27 -04:00
// [AUTOSAR Rule M17-0-2] the name 'signal' is reserved to the compiler
2019-12-31 15:56:23 -05:00
-esym(9093,
signal)
// public virtual function 'QP::QXThread::...'
-esym(1731,
QP::QXThread::*)
2022-08-28 22:12:27 -04:00
// [AUTOSAR Rule M8-4-2] parameter of function has different name than
// overridden function
-esym(9272,
QP::QXMutex::init*)
2022-09-22 11:13:20 -04:00
// function xxx matches the name of a standard library function
-esym(8502,
signal) // QXSemaphore::signal()
2019-12-31 15:56:23 -05:00
// QS ------------------------------------------------------------------------
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
QS_INIT,
QS_EXIT,
QS_DUMP,
QS_RESET,
2020-10-01 12:50:17 -04:00
QS_GLB_FILTER,
QS_LOC_FILTER,
2019-12-31 15:56:23 -05:00
QS_FILTER_AP_OBJ,
QS_GET_BYTE,
QS_GET_BLOCK,
2020-10-01 12:50:17 -04:00
QS_BEGIN_ID,
2019-12-31 15:56:23 -05:00
QS_END,
QS_BEGIN_INCRIT,
QS_END_INCRIT,
QS_QF_CRIT_ENTRY,
QS_QF_CRIT_EXIT,
QS_QF_ISR_ENTRY,
QS_QF_ISR_EXIT,
QS_ONLY,
2019-12-31 15:56:23 -05:00
QS_I8,
QS_U8,
QS_I16,
QS_U16,
QS_I32,
QS_I64,
QS_U32,
QS_F32,
QS_F64,
QS_U64,
QS_U32_HEX,
QS_STR,
QS_OBJ,
QS_FUN,
QS_SIG_DICTIONARY,
QS_OBJ_DICTIONARY,
QS_OBJ_ARR_DICTIONARY,
2019-12-31 15:56:23 -05:00
QS_FUN_DICTIONARY,
QS_USR_DICTIONARY,
2023-01-06 12:56:50 -05:00
QS_ENUM_DICTIONARY,
2019-12-31 15:56:23 -05:00
QS_ASSERTION,
QS_FLUSH,
QS_MEM,
2023-01-06 12:56:50 -05:00
QS_ENUM,
2019-12-31 15:56:23 -05:00
QS_SIG,
QS_PTR_AT_,
QS_RX_PUT,
QS_OUTPUT,
QS_RX_INPUT,
QS_TEST_PAUSE,
QS_TEST_PROBE_DEF,
QS_TEST_PROBE,
QS_TEST_PROBE_ID)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
2020-10-01 12:50:17 -04:00
QS_GLB_CHECK_,
QS_LOC_CHECK_,
2019-12-31 15:56:23 -05:00
QS_BEGIN_PRE_,
QS_END_PRE_,
QS_BEGIN_PRE_,
QS_END_PRE_,
2019-12-31 15:56:23 -05:00
QS_U8_PRE_,
QS_2U8_PRE_,
QS_U16_PRE_,
QS_U32_PRE_,
QS_STR_PRE_,
QS_TIME_PRE_,
QS_SIG_PRE_,
QS_EVS_PRE_,
QS_OBJ_PRE_,
QS_FUN_PRE_,
QS_EQC_PRE_,
QS_MPC_PRE_,
QS_MPS_PRE_,
QS_TEC_PRE_)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 function-like macro
2019-12-31 15:56:23 -05:00
-esym(9026,
QS_REC_DONE)
// definition of macro ends in semi-colon
-esym(823,
QS_TEST_PROBE_DEF)
// M3-R11.1(r) conversion between pointer to function type
-emacro(9074,
QS_FUN_DICTIONARY,
QS_TEST_PROBE_DEF)
2023-01-06 12:56:50 -05:00
// AC++M16-3-2 stringize operator used in definition of function-like macro
2019-12-31 15:56:23 -05:00
-esym(9024,
QS_OBJ_DICTIONARY,
QS_OBJ_ARR_DICTIONARY,
2019-12-31 15:56:23 -05:00
QS_FUN_DICTIONARY,
QS_SIG_DICTIONARY,
2023-01-06 12:56:50 -05:00
QS_USR_DICTIONARY,
QS_ENUM_DICTIONARY)
2019-12-31 15:56:23 -05:00
// M3-R10.3(r) cannot assign enum to different essential type
-emacro(9034,
QS_SIG_DICTIONARY)
// implicit conversion of enum to integral type 'int'
-emacro(641,
QS_SIG_DICTIONARY)
// MC++R11-0-1 non-private data member within a non-POD structure
-esym(9150,
QP::QEvt::*,
2019-12-31 15:56:23 -05:00
QP::QActive::*,
QP::QF::Attr::*,
2019-12-31 15:56:23 -05:00
QP::QS::QSrxPriv::*)
// MC++9-5-1 union declared
-esym(9018,
F32Rep,
F64Rep,
U32Rep,
TCast,
QP::QS::RxAttr::Variant)
2019-12-31 15:56:23 -05:00