我正在尝试使夹板与我正在处理的嵌入式项目一起工作。我想知道是否有一个示例.splintrc
选项文件,我可以在其中添加自己的选项/配置以简化整个过程。我正在使用 IAR 工作台来编译和构建项目,并希望将夹板与 IDE 集成。
1 回答
0
这是一个试图涵盖一些 MISRA-C 2004 规则的选项文件:
#-hints
#-forcehints
-linelen 120
-parenfileformat
+quiet
-booltype bool
-booltrue true
-boolfalse false
-standard
+strictlib
# the flags commented out below are switched on by default or the
# '-standard' shortcut.
+ansi89limits
#+boolops
#+casebreak
#-charint
+cppnames
+declundef
+elseifcomplete
#+evalorder
+exportheader
+exportheadervar
#+exportlocal
-externalnamelen 31
+fcnmacros
#+firstcase
#-floatdouble
+forblock
#+gnuextensions
+ifblock
#-ignorequals
#-ignoresigns
#+imptype
#+incompletetype
#+incondefs
#+initsize
-internalnamelen 31
+isoreserved
+isoreservedinternal
#-longintegral
#-longunsignedintegral
#+macroassign
#+macrofcndecl
#+macroparams
#+macroparens
#+macrostmt
-maintype
#-matchanyintegral
#-modfilesystem
#+namechecks
#+nestcomment
#+noeffect
+noparams
#+noret
+oldstyle
#+predassign
#+predboolint
+protoparammatch
#-protoparamname
+ptrarith
#+realcompare
+redecl
#+redef
-relaxquals
#-relaxtypes
+retval
#+shadow
#+shiftimplementation
#+shiftnegative
+slashslashcomment
#+stackref
#+sysunrecog
#+type
#+unreachable
#+unrecog
#+unrecogdirective
#+usedef
#+usevarargs
+whileblock
资料来源: http ://www.cs.virginia.edu/pipermail/splint-discuss/2007-March/000923.html
于 2015-12-08T08:25:43.270 回答