mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-28 06:02:56 +08:00
393 lines
9.5 KiB
Plaintext
393 lines
9.5 KiB
Plaintext
/// @file
|
|
/// @brief PC-Lint-Plus option file for linting QP/C++ source code
|
|
/// @cond
|
|
///===========================================================================
|
|
/// Last updated for version 6.9.1
|
|
/// Last updated on 2020-09-17
|
|
///
|
|
/// Q u a n t u m L e a P s
|
|
/// ------------------------
|
|
/// Modern Embedded Software
|
|
///
|
|
/// Copyright (C) 2005-2020 Quantum Leaps. All rights reserved.
|
|
///
|
|
/// This program is open source software: you can redistribute it and/or
|
|
/// modify it under the terms of the GNU General Public License as published
|
|
/// by the Free Software Foundation, either version 3 of the License, or
|
|
/// (at your option) any later version.
|
|
///
|
|
/// Alternatively, this program may be distributed and modified under the
|
|
/// terms of Quantum Leaps commercial licenses, which expressly supersede
|
|
/// the GNU General Public License and are specifically designed for
|
|
/// licensees interested in retaining the proprietary status of their code.
|
|
///
|
|
/// This program is distributed in the hope that it will be useful,
|
|
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
/// GNU General Public License for more details.
|
|
///
|
|
/// You should have received a copy of the GNU General Public License
|
|
/// along with this program. If not, see <www.gnu.org/licenses>.
|
|
///
|
|
/// Contact information:
|
|
/// <www.state-machine.com/licensing>
|
|
/// <info@state-machine.com>
|
|
///===========================================================================
|
|
/// @endcond
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// general options
|
|
-unit_check // perform only subset check (suppresses Global Wrapup)
|
|
-max_threads=1 // suppress message "no '-max_threads=N' option"
|
|
//-vf // print names of all source files (for debugging linting)
|
|
|
|
// include directories
|
|
-i. // QP/C++ port includes (see also qk/ and qv/)
|
|
-i%QPCPP%/include // QP/C++ public includes
|
|
-i%QPCPP%/src // QP/C++ package-scope includes
|
|
|
|
// standards
|
|
-std=c++11 // C++ language standard
|
|
au-autosar.lnt // AUTOSAR:C++14
|
|
au-ds.lnt // Dan Saks recommendations
|
|
//-strong(AXJ) // Strong type checking
|
|
|
|
// size/alignment options
|
|
cpu.lnt // for the chosen CPU
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// QP/C++ options for clients
|
|
qpcpp.lnt // QP/C++ options
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// additional suppression rules for building QP/C source code...
|
|
|
|
// general suppression for now...
|
|
|
|
// preprocessor directive ... is deprecated. [AUTOSAR Rule A16-0-1]
|
|
-e586
|
|
|
|
// preprocessor directive encountered in conditionally excluded region
|
|
// [AUTOSAR Rule A16-0-1], [AUTOSAR Rule A16-6-1]
|
|
-e886
|
|
|
|
// friend ... in class
|
|
-e9435
|
|
|
|
// symbol ... has array type
|
|
-e9436
|
|
|
|
// enum ... is not a scoped enumeration [AUTOSAR Rule A7-2-3]
|
|
-e9419
|
|
|
|
// QEP -----------------------------------------------------------------------
|
|
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QEP_TRIG_,
|
|
QEP_ENTER_,
|
|
QEP_EXIT_,
|
|
QEP_ACT_PTR_INC_)
|
|
|
|
// MC++R7-1-2 parameter of function could be pointer to const
|
|
-esym(818,
|
|
QP::QHsm::top)
|
|
|
|
|
|
// QF ------------------------------------------------------------------------
|
|
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QF_CRIT_E_,
|
|
QF_CRIT_X_,
|
|
QF_EVT_REF_CTR_INC_,
|
|
QF_EVT_REF_CTR_DEC_,
|
|
QF_PTR_AT_,
|
|
QF_EVT_CONST_CAST_,
|
|
QF_CRIT_ENTRY_,
|
|
QF_CRIT_EXIT_,
|
|
Q_ASSERT_CRIT_,
|
|
Q_REQUIRE_CRIT_,
|
|
Q_ERROR_CRIT_,
|
|
QF_SCHED_LOCK_,
|
|
QF_SCHED_UNLOCK_,
|
|
QF_ISR_CONTEXT_,
|
|
QF_PTR_RANGE_,
|
|
QF_MPOOL_EL,
|
|
QTICKER_CAST_)
|
|
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QACTIVE_EQUEUE_WAIT_,
|
|
QACTIVE_EQUEUE_SIGNAL_,
|
|
QF_EPOOL_INIT_,
|
|
QF_EPOOL_EVENT_SIZE_,
|
|
QF_EPOOL_GET_,
|
|
QF_EPOOL_PUT_,
|
|
QF_PTR_INC_,
|
|
QF_QMACTIVE_TO_QMSM_CAST_,
|
|
QF_QMACTIVE_TO_QMSM_CONST_CAST_)
|
|
|
|
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
|
|
-esym(9022,
|
|
QF_PTR_AT_)
|
|
|
|
// M3-R11.3(r) cast from pointer to object type
|
|
-emacro(9087,
|
|
QTICKER_CAST_)
|
|
|
|
// suspicious pointer-to-pointer conversion (area too small)
|
|
-emacro(826,
|
|
QTICKER_CAST_)
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QF_CRIT_STAT_)
|
|
|
|
// M3-R11.8(r) cast drops const qualifier
|
|
-emacro(9005,
|
|
QF_EVT_REF_CTR_INC_,
|
|
QF_EVT_REF_CTR_DEC_,
|
|
QF_EPOOL_PUT_)
|
|
|
|
// M3-D11.5(a) conversion from pointer to void to other pointer type
|
|
-efunc(9079,
|
|
QF_bzero)
|
|
|
|
// M3-R17.8(a) function parameter modified
|
|
-efunc(9044,
|
|
QF_LOG2,
|
|
QMPool_init)
|
|
|
|
// M3-R18.1(r) potential out of bounds pointer access
|
|
-emacro(661,
|
|
QF_EPOOL_EVENT_SIZE_)
|
|
|
|
// AR-M5-2-8 conversion from pointer to void to other pointer type
|
|
-emacro(9079,
|
|
QF_EPOOL_GET_)
|
|
|
|
-efunc(9079,
|
|
QP::QF::bzero,
|
|
QP::QTimeEvt::armX,
|
|
QP::QTimeEvt::disarm,
|
|
QP::QTimeEvt::rearm,
|
|
QP::QMPool::init,
|
|
QP::QMPool::get,
|
|
QP::QMPool::put)
|
|
|
|
// M3-R18.3(r) relational operator <= applied to pointers
|
|
-emacro(946,
|
|
QF_PTR_RANGE_)
|
|
|
|
// M3-R8.13(a) parameter of function could be pointer to const
|
|
-efunc(818,
|
|
QP::QActive::start_,
|
|
QP::QTicker::postLIFO_)
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QF_SCHED_STAT_)
|
|
|
|
// MC++R0-1-1 statement is unreachable due to unconditional transfer
|
|
// of control (assertion)
|
|
//-efunc(527,
|
|
// QP::QMActive::isIn,
|
|
// QP::QMActive::state,
|
|
// QP::QMActive::childState)
|
|
|
|
// MC++R7-1-1 parameter of function could be declared const
|
|
-esym(952,
|
|
QP::QEQueue::init)
|
|
|
|
// variable has 'static' storage duration and non-POD type
|
|
-esym(1756,
|
|
QP::QF_pool_,
|
|
QP::QF::timeEvtHead_)
|
|
|
|
// call to unqualified virtual function 'QP::QHsm::init'
|
|
// from non-static member function
|
|
-esym(1933,
|
|
QP::QHsm::init)
|
|
|
|
// QV ------------------------------------------------------------------------
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QV_CPU_SLEEP)
|
|
|
|
|
|
// QK ------------------------------------------------------------------------
|
|
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QK_ISR_CONTEXT_,
|
|
QK_ISR_ENTRY,
|
|
QK_ISR_EXIT)
|
|
|
|
|
|
// QXK -----------------------------------------------------------------------
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QXK_ISR_CONTEXT_,
|
|
QXK_CONTEXT_SWITCH_,
|
|
QXK_PTR_CAST_,
|
|
QXTHREAD_CAST_)
|
|
|
|
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
|
|
-esym(9022,
|
|
QXK_PTR_CAST_)
|
|
|
|
// MC++R5-2-7 pointer type converted to unrelated pointer
|
|
-emacro(9176,
|
|
Q_STATE_CAST)
|
|
|
|
// M3-R11.3(r) cast to pointer to different object type
|
|
//-emacro(9087,
|
|
// QXK_PTR_CAST_,
|
|
// QXTHREAD_CAST_)
|
|
|
|
// MC++R5-2-7 pointer type converted to unrelated pointer type
|
|
-emacro(9176,
|
|
QXK_PTR_CAST_)
|
|
|
|
// MC++R5-2-3 downcast of polymorphic type ... to type ...
|
|
-emacro(9171,
|
|
QXK_PTR_CAST_)
|
|
|
|
// casting from base class 'QP::QActive' to derived class
|
|
-emacro(1939,
|
|
QXK_PTR_CAST_)
|
|
|
|
// suspicious pointer-to-pointer conversion (area too small)
|
|
-emacro(826,
|
|
QXK_PTR_CAST_,
|
|
QXTHREAD_CAST_)
|
|
|
|
// M3-R8.13(a) parameter 'me' of function could be pointer to const
|
|
//-efunc(818,
|
|
// QXThread_init_,
|
|
// QXThread_dispatch_,
|
|
// QXThread_postLIFO_)
|
|
|
|
// ariable 'QP::l_idleThread' has 'static' storage duration and non-POD type
|
|
-esym(1756,
|
|
QP::l_idleThread)
|
|
|
|
// QS ------------------------------------------------------------------------
|
|
// the following options are needed only when Q_SPY is defined
|
|
|
|
// MC++R16-0-4 function-like macro
|
|
-esym(9026,
|
|
QS_CRIT_E_,
|
|
QS_CRIT_X_,
|
|
QS_PTR_AT_,
|
|
QS_PTR_INC_,
|
|
QS_INSERT_BYTE_,
|
|
QS_INSERT_ESC_BYTE_,
|
|
QS_REC_NUM_)
|
|
|
|
// M3-R14.3(r) boolean condition for 'if' always evaluates to 'false'
|
|
-emacro(774,,
|
|
QS_INSERT_BYTE_,
|
|
QS_INSERT_ESC_BYTE_,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// the right operand to << always evaluates to 0
|
|
-emacro(845,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// excessive shift value (precision 3 shifted right by 3)
|
|
-emacro(572,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// constant expression evaluates to 0 in 'binary' operation '>>'
|
|
-emacro(778,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// constant value used in Boolean context
|
|
-emacro(506,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// bitwise operator '>>' applied to signed underlying type [AS-M5-0-21]
|
|
-emacro(9130,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// use of c-style cast to void [AS-A5-2-2]
|
|
-emacro(1954,
|
|
QS_END_PRE_)
|
|
|
|
// MC++R0-1-9 operator == always evaluates to true
|
|
-emacro(948,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// MC++R0-1-1, MC++R0-1-2, MC++R0-1-9
|
|
// left operand to '||' always evaluates to 'true'
|
|
-emacro(944,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// MC++R5-2-9 casting from pointer type to integer type
|
|
-emacro(9091,
|
|
QS_OBJ_PRE_,
|
|
QS_FUN_PRE_)
|
|
|
|
// M3-R11.6(r) explicit cast from 'void *volatile' to 'uint32_t'
|
|
//-emacro(923,
|
|
// QS_OBJ_PRE_,
|
|
// QS_FUN_PRE_)
|
|
|
|
// M3-R11.1(4) conversion between pointer to function and differing type
|
|
//-emacro(9074,
|
|
// QS_FUN_PRE_)
|
|
|
|
// definition of macro ends in semi-colon
|
|
-esym(823,
|
|
QS_CRIT_STAT_,
|
|
QS_BEGIN_PRE_,
|
|
QS_BEGIN_NOCRIT_PRE_)
|
|
|
|
// union initialization
|
|
-efunc(708,
|
|
QS_f64_fmt_)
|
|
|
|
// M3-R19.2(a) union declared
|
|
-efunc(9018,
|
|
QS_f32_fmt_,
|
|
QS_f64_fmt_)
|
|
|
|
// MC++R10-0-6 unparenthesized macro parameter in definition of macro
|
|
-esym(9022,
|
|
QS_TEST_PROBE,
|
|
QS_TEST_PROBE_ID)
|
|
|
|
// AR M5-0-10 the result of the ~ operator applied to an object with an
|
|
// underlying type of 'unsigned char' must be cast to 'unsigned char'
|
|
// in this context
|
|
-efunc(9126,
|
|
QP::QS::glbFilter_,
|
|
QP::QS::locFilter_)
|
|
|
|
// don't report problems within QS_target_info_() function
|
|
-efunc(9130,
|
|
QP::QS_target_info_)
|
|
-efunc(9114,
|
|
QP::QS_target_info_)
|
|
-efunc(9117,
|
|
QP::QS_target_info_)
|
|
-efunc(9125,
|
|
QP::QS_target_info_)
|
|
-efunc(9112,
|
|
QP::QS_target_info_)
|
|
-efunc(9128,
|
|
QP::QS_target_info_)
|
|
-efunc(737,
|
|
QP::QS_target_info_)
|
|
|