qpc/ports/lint/options.lnt
Quantum Leaps 6d951c9f06 5.9.7a
2017-08-29 15:59:44 -04:00

215 lines
6.5 KiB
Plaintext

/// @file
/// @brief PC-Lint 9.x option file for linting QP/C source code
/// @cond
///===========================================================================
/// Product: QP/C
/// Last Updated for Version: 5.9.7
/// Date of the Last Update: 2017-08-20
///
/// Q u a n t u m L e a P s
/// ---------------------------
/// innovating embedded systems
///
/// Copyright (C) Quantum Leaps. All rights reserved.
///
/// This program is free 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 <http://www.gnu.org/licenses/>.
///
/// Contact information:
/// https://state-machine.com
/// info@state-machine.com
///============================================================================
/// @endcond
// library headers
+libclass() // lint all header files, including "foreign"
//-vf // print names of all source files
+fdi // start #include search in dir of the including file
-i. // QP/C port includes (see also qk/ and qv/)
-i../../include // QP/C public includes
-i../../src // QP/C package-scope includes
-si4 // sizeof(int)
-ss2 // sizeof(short)
-spD4 // sizeof(void *)
-spP4 // sizeof(function pointer)
au-misra2.lnt // MISRA-C:2004 options
au-ds.lnt // Dan Saks recommendations
qpc.lnt // QP/C options
-strong(AXJ) // Strong type checking
// general
+e900 // prints a success message at the end
// QEP
-emacro(960, // MISRA04-14.3(req) null not in line by itself
QEP_ENTER_,
QEP_EXIT_)
-emacro(960, // MISR04-17.4(req), pointer arithmetic
QEP_ACT_PTR_INC_)
-estring(961, // MISRA04-19.7(adv) function-like macro
QEP_TRIG_,
QEP_ENTER_,
QEP_EXIT_,
QEP_ACT_PTR_INC_)
-emacro(717, // do ... while(0);
QEP_ENTER_,
QEP_EXIT_)
-efunc(632, // Assignment to strong type 'QStateHandler'
QHsm_init)
-efunc(661, // Possible access of out-of-bounds pointer
QMsm_execTatbl_)
-efunc(644, // Variable 'entry' may not be initialized
QMsm_enterHistory_)
// QF
-emacro(960, // MISRA04-11.5(req) cast away const
QF_EVT_REF_CTR_INC_,
QF_EVT_REF_CTR_DEC_,
QF_EPOOL_PUT_)
-esym(960, // MISRA04-8.7(req) could define at block scope
QF_log2Lkup,
QF_subscrList_,
QF_maxPubSignal_)
-emacro(960, // MISRA04-17.4(req) pointer arithmetic
QF_PTR_AT_)
-emacro(946, // MISRA04-17.2(req),17.3(req)
QF_PTR_RANGE_) // Relation or subtraction applied to pointers
-emacro(929, // MISRA04-11.4(adv) cast pointer to pointer
QF_EVT_REF_CTR_INC_,
QF_EVT_REF_CTR_DEC_,
QF_EPOOL_PUT_,
QMSM_CAST,
QTICKER_CAST)
-estring(961, // MISRA04-19.7(adv) function-like macro
QF_EVT_REF_CTR_INC_,
QF_EVT_REF_CTR_DEC_,
QF_PTR_AT_,
QF_CRIT_ENTRY_,
QF_CRIT_EXIT_,
QF_SCHED_LOCK_,
QF_SCHED_UNLOCK_,
QF_ISR_CONTEXT_,
QF_PTR_RANGE_,
QF_MPOOL_EL,
QMSM_CAST,
QTICKER_CAST)
-esym(960, // MISRA04-19.4(req) Disallowed macro definition
QF_CRIT_ENTRY_,
QF_CRIT_EXIT_,
QF_SCHED_STAT_,
QF_SCHED_LOCK_,
QF_SCHED_UNLOCK_,
QF_EPOOL_TYPE_,
QF_ACTIVE_SUPER_,
QF_ACTIVE_STATE_,
QF_CRIT_STAT_,
QF_PTR_AT_,
QACTIVE_EQUEUE_WAIT_,
QACTIVE_EQUEUE_SIGNAL_,
QACTIVE_EQUEUE_ONEMPTY_)
-emacro(740, // MISRA04-1.2(req) Unusual pointer cast (icomp. indirect types)
QMSM_CAST)
-efunc(818, // MISRA04-16.7(adv) 'stkSto' could be const
QActive_start_)
-efunc(527, QF_run) // MISRA04-14.17(req) Unreachable code
-efunc(845,
QEQueue_post) // MISRA04-13.7(req) The left argument to '&&' is zero
-emacro({717}, // do ... while(0);
QACTIVE_EQUEUE_SIGNAL_,
QACTIVE_EQUEUE_ONEMPTY_,
QF_SCHED_LOCK_,
QF_SCHED_UNLOCK_)
-esym(960, 8.8) // MISRA04-8.8(req) Seems to be checked incorrectly...
// QV
// QK
// QXK
-estring(961, // MISRA04-19.7(adv) function-like macro
QXK_CONTEXT_SWITCH_)
// QS -- the following options are needed only when Q_SPY is defined
-emacro(960, // MISRA04-17.4(req), pointer arithmetic
QS_RX_AT_,
QS_PTR_INC_)
-efunc(960, // MISRA04-18.4(req) declaration of union
QS_f32,
QS_f64)
-estring(960, // MISRA04-8.7(req) could use block scope
QS_seq_,
QS_priv_)
-estring(961, // MISRA04-19.7(adv) function-like macro
QS_INSERT_BYTE,
QS_INSERT_ESC_BYTE,
QS_INSERT_CHKSUM_BYTE,
QS_PTR_INC_,
QS_RX_AT_,
QS_RX_TRAN_)
-emacro(506, // MISRA04-13.7(req) & 14.1(req)
QS_BEGIN_,
QS_BEGIN_NOCRIT_)
-emacro(923, // MISRA04-11.1(req) & 11.3(req)
QS_OBJ_,
QS_FUN_)
-emacro(572, // MISRA04-12.8(req) excessive shift value
QS_BEGIN_,
QS_BEGIN_NOCRIT_)
-esym(960, // MISRA04-19.4(req) Disallowed macro definition
QS_BEGIN_,
QS_END_,
QS_BEGIN_NOCRIT_,
QS_END_NOCRIT_,
QS_INSERT_BYTE,
QS_INSERT_ESC_BYTE,
QS_INSERT_CHKSUM_BYTE,
QS_EQC_,
QS_EVS_,
QS_MPS_,
QS_MPC_,
QS_TEC_)
-emacro(961, QS_TEC_) // MISRA04-12.13(adv)
-emacro(774, // Boolean within 'if' always False
QS_BEGIN_,
QS_BEGIN_NOCRIT_)
-emacro(778, // expression evaluates to 0 in operation '>>'
QS_BEGIN_,
QS_BEGIN_NOCRIT_)
-emacro(845, // The right argument of '<<' is zero
QS_BEGIN_,
QS_BEGIN_NOCRIT_)
-emacro(725, // Expected positive indentation
QS_END_,
QS_END_NOCRIT_)
-emacro(778, // zero in operation '&'
QS_BEGIN_NOCRIT_)
-estring(960, // MISRA04-18.4(req) declaration of union type
QSRxExtState)
-esym(754, // Info: Symbol not referenced
U32Rep::u32)
// Warning 537 "Repeated include file" is generated only for QEP source code
// This warning is redundant, because all QP header files are protected
// by #ifndef xxx_h ... #endif preprocessor checks.
-e537 // Repeated include file (checked by 451)