qpcpp/ports/lint-plus/options.lnt
2019-12-31 15:56:23 -05:00

348 lines
8.5 KiB
Plaintext

/// @file
/// @brief PC-Lint-Plus option file for linting QP/C++ source code
/// @cond
///===========================================================================
/// Product: QP/C++
/// Last updated for version 6.7.0
/// Last updated on 2019-12-26
///
/// Q u a n t u m L e a P s
/// ------------------------
/// Modern Embedded Software
///
/// Copyright (C) 2005-2019 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
// size options corresponding to GNU-ARM
-si4 -sl4 -sll8 -ss2 -sw4 -sp4 -sf4 -sd8 -sld8 +fzl
// standards
au-misra-cpp.lnt // MISRA-C++:2008
au-ds.lnt // Dan Saks recommendations
//-strong(AXJ) // Strong type checking
/////////////////////////////////////////////////////////////////////////////
// QP/C++ options for clients
qpcpp.lnt // QP/C options
/////////////////////////////////////////////////////////////////////////////
// additional suppression rules for building QP/C source code...
// 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_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_)
// M3-R11.5(a) conversion from pointer to void to other pointer type
-emacro(9079,
QF_EPOOL_GET_)
-efunc(9079,
QF_deleteRef_,
QMPool_get,
QMPool_put)
// M3-R11.5(a) conversion from pointer to void to other pointer type
-efunc(9079,
QMPool_init,
QF_tickX_,
QTimeEvt_armX,
QTimeEvt_rearm)
// 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,
QActive_start_,
QTicker_postLIFO_)
// definition of macro ends in semi-colon
-esym(823,
QF_SCHED_STAT_)
// MC++R5-2-8 conversion from pointer to void to other pointer type
-efunc(9079,
QP::QF::bzero)
// MC++R5-2-8 conversion from pointer to void to other pointer type
-efunc(9079,
QP::QMPool::init,
QP::QMPool::get,
QP::QMPool::put)
// 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_GLB_FILTER_,
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_)
// 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)