adlint 2.6.14 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -3
- data/ChangeLog +511 -0
- data/INSTALL +1 -1
- data/MANIFEST +57 -37
- data/NEWS +36 -7
- data/README +2 -2
- data/Rakefile +6 -6
- data/TODO +1 -1
- data/bin/adlint +25 -16
- data/bin/adlint_chk +22 -12
- data/bin/adlint_cma +17 -12
- data/bin/adlint_sma +22 -12
- data/bin/adlintize +98 -17
- data/etc/conf.d/fallback/cinit.erb +1 -1
- data/etc/conf.d/fallback/traits.erb +37 -37
- data/etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb +1 -1
- data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +41 -41
- data/etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb +1 -1
- data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +40 -40
- data/etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb +1 -1
- data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +40 -40
- data/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb +1 -1
- data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +40 -40
- data/etc/conf.d/noarch/GNUmakefile.erb +1 -1
- data/etc/conf.d/noarch/adlint_all_bat.erb +1 -1
- data/etc/conf.d/noarch/adlint_all_sh.erb +1 -1
- data/etc/conf.d/noarch/pinit.erb +1 -1
- data/etc/conf.d/x86_64-ubuntu_12.04/cinit-gcc_4.6.3.erb +1 -1
- data/etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb +42 -42
- data/etc/mesg.d/c_builtin/en_US/messages.yml +33 -33
- data/etc/mesg.d/c_builtin/ja_JP/messages.yml +5 -5
- data/etc/mesg.d/core/en_US/messages.yml +2 -2
- data/etc/mesg.d/core/ja_JP/messages.yml +2 -2
- data/features/code_check/W0018.feature +197 -0
- data/features/code_check/W0019.feature +79 -0
- data/features/code_check/W0021.feature +81 -0
- data/features/code_check/W0023.feature +203 -0
- data/features/code_check/W0024.feature +226 -0
- data/features/code_check/W0025.feature +5 -0
- data/features/code_check/W0088.feature +2 -2
- data/features/code_check/W0109.feature +2 -2
- data/features/code_check/W0477.feature +0 -3
- data/features/code_check/W0478.feature +0 -1
- data/features/code_check/W0582.feature +3 -3
- data/features/code_check/W0583.feature +4 -7
- data/features/code_check/W0646.feature +0 -1
- data/features/code_check/W0695.feature +0 -1
- data/features/code_check/W0705.feature +8 -0
- data/features/code_check/W0723.feature +0 -1
- data/features/code_check/W0745.feature +1 -0
- data/features/code_check/W0781.feature +1 -0
- data/features/code_check/W1057.feature +141 -0
- data/features/code_check/W1058.feature +93 -0
- data/features/code_check/W1059.feature +86 -0
- data/features/code_check/W1060.feature +77 -0
- data/features/code_check/W1061.feature +143 -0
- data/features/code_check/W1062.feature +162 -0
- data/features/code_check/W1063.feature +123 -0
- data/features/code_check/W1064.feature +83 -0
- data/features/code_check/W1065.feature +82 -0
- data/features/code_check/W9003.feature +2 -0
- data/features/step_definitions/code_check_steps.rb +1 -0
- data/features/support/env.rb +16 -13
- data/lib/adlint.rb +7 -4
- data/lib/adlint/analyzer.rb +131 -157
- data/lib/adlint/annot.rb +149 -0
- data/lib/adlint/cc1.rb +57 -0
- data/lib/adlint/{c → cc1}/branch.rb +74 -62
- data/lib/adlint/{c → cc1}/builtin.rb +21 -21
- data/lib/adlint/{c → cc1}/const.rb +119 -117
- data/lib/adlint/{c → cc1}/conv.rb +76 -78
- data/lib/adlint/{c → cc1}/ctrlexpr.rb +69 -86
- data/lib/adlint/cc1/domain.rb +8103 -0
- data/lib/adlint/{c → cc1}/enum.rb +3 -3
- data/lib/adlint/{c → cc1}/environ.rb +21 -21
- data/lib/adlint/{c → cc1}/expr.rb +232 -218
- data/lib/adlint/{c → cc1}/format.rb +305 -342
- data/lib/adlint/{c → cc1}/interp.rb +269 -220
- data/lib/adlint/cc1/lexer.rb +246 -0
- data/lib/adlint/{c → cc1}/mediator.rb +78 -84
- data/lib/adlint/{c → cc1}/object.rb +261 -264
- data/lib/adlint/{c → cc1}/operator.rb +7 -7
- data/lib/adlint/{c → cc1}/option.rb +4 -3
- data/lib/adlint/{c → cc1}/parser.rb +274 -506
- data/lib/adlint/{c → cc1}/parser.y +69 -301
- data/lib/adlint/cc1/phase.rb +138 -0
- data/lib/adlint/{c → cc1}/resolver.rb +66 -78
- data/lib/adlint/{c → cc1}/scanner.rb +57 -49
- data/lib/adlint/{c → cc1}/scope.rb +3 -3
- data/lib/adlint/{c → cc1}/seqp.rb +13 -5
- data/lib/adlint/{c → cc1}/syntax.rb +819 -1122
- data/lib/adlint/{c → cc1}/type.rb +1498 -1479
- data/lib/adlint/{c → cc1}/util.rb +20 -12
- data/lib/adlint/{c → cc1}/value.rb +699 -642
- data/lib/adlint/code.rb +163 -164
- data/lib/adlint/cpp.rb +2 -2
- data/lib/adlint/cpp/asm.rb +13 -14
- data/lib/adlint/cpp/constexpr.rb +42 -38
- data/lib/adlint/cpp/constexpr.y +44 -40
- data/lib/adlint/cpp/eval.rb +435 -435
- data/lib/adlint/cpp/lexer.rb +343 -340
- data/lib/adlint/cpp/macro.rb +188 -190
- data/lib/adlint/cpp/phase.rb +66 -45
- data/lib/adlint/cpp/scanner.rb +14 -17
- data/lib/adlint/cpp/source.rb +49 -55
- data/lib/adlint/cpp/subst.rb +65 -65
- data/lib/adlint/cpp/syntax.rb +155 -275
- data/lib/adlint/cpp/util.rb +22 -19
- data/lib/adlint/driver.rb +86 -93
- data/lib/adlint/error.rb +33 -52
- data/lib/adlint/exam.rb +158 -24
- data/lib/adlint/exam/c_builtin.rb +7 -7
- data/lib/adlint/exam/c_builtin/cc1_check.rb +20522 -0
- data/lib/adlint/exam/c_builtin/cc1_check_shima.rb +957 -0
- data/lib/adlint/exam/c_builtin/cc1_code.rb +459 -0
- data/lib/adlint/exam/c_builtin/cc1_metric.rb +794 -0
- data/lib/adlint/exam/c_builtin/cpp_check.rb +486 -441
- data/lib/adlint/exam/c_builtin/cpp_check_shima.rb +36 -39
- data/lib/adlint/exam/c_builtin/cpp_code.rb +63 -65
- data/lib/adlint/exam/c_builtin/ld_check.rb +136 -129
- data/lib/adlint/exam/c_builtin/ld_metric.rb +11 -11
- data/lib/adlint/lang.rb +25 -25
- data/lib/adlint/ld.rb +2 -2
- data/lib/adlint/ld/object.rb +220 -188
- data/lib/adlint/ld/phase.rb +94 -63
- data/lib/adlint/ld/typedef.rb +22 -11
- data/lib/adlint/ld/util.rb +43 -35
- data/lib/adlint/lexer.rb +59 -56
- data/lib/adlint/location.rb +140 -0
- data/lib/adlint/memo.rb +157 -0
- data/lib/adlint/message.rb +207 -156
- data/lib/adlint/metric.rb +139 -217
- data/lib/adlint/monitor.rb +45 -43
- data/lib/adlint/phase.rb +56 -29
- data/lib/adlint/prelude.rb +66 -54
- data/lib/adlint/report.rb +253 -332
- data/lib/adlint/source.rb +26 -27
- data/lib/adlint/supp.rb +131 -0
- data/lib/adlint/symbol.rb +14 -16
- data/lib/adlint/token.rb +19 -91
- data/lib/adlint/traits.rb +242 -226
- data/lib/adlint/util.rb +116 -205
- data/lib/adlint/version.rb +8 -8
- data/share/HEADER +2 -2
- data/share/doc/developers_guide_ja.html +148 -19
- data/share/doc/developers_guide_ja.texi +141 -11
- data/share/doc/samples/GNUmakefile +1 -1
- data/share/doc/samples/adlint_traits.yml +45 -36
- data/share/doc/users_guide_en.html +1321 -1252
- data/share/doc/users_guide_en.texi +475 -408
- data/share/doc/users_guide_ja.html +1932 -1878
- data/share/doc/users_guide_ja.texi +324 -273
- data/share/sample/bison-2.5/adlint/GNUmakefile +5 -1
- data/share/sample/bison-2.5/adlint/adlint_traits.yml +38 -38
- data/share/sample/bison-2.5/adlint/lib/GNUmakefile +1 -1
- data/share/sample/bison-2.5/adlint/lib/adlint_cinit.h +1 -1
- data/share/sample/bison-2.5/adlint/lib/adlint_pinit.h +1 -1
- data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +50 -42
- data/share/sample/bison-2.5/adlint/src/GNUmakefile +1 -1
- data/share/sample/bison-2.5/adlint/src/adlint_cinit.h +1 -1
- data/share/sample/bison-2.5/adlint/src/adlint_pinit.h +1 -1
- data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +50 -42
- data/share/sample/ctags-5.8/adlint/GNUmakefile +1 -1
- data/share/sample/ctags-5.8/adlint/adlint_cinit.h +1 -1
- data/share/sample/ctags-5.8/adlint/adlint_pinit.h +1 -1
- data/share/sample/ctags-5.8/adlint/adlint_traits.yml +50 -42
- data/share/sample/flex-2.5.35/adlint/GNUmakefile +1 -1
- data/share/sample/flex-2.5.35/adlint/adlint_cinit.h +1 -1
- data/share/sample/flex-2.5.35/adlint/adlint_pinit.h +1 -1
- data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +46 -38
- data/share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +50 -42
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h +1 -1
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +50 -42
- data/share/sample/screen-4.0.3/adlint/GNUmakefile +1 -1
- data/share/sample/screen-4.0.3/adlint/adlint_cinit.h +1 -1
- data/share/sample/screen-4.0.3/adlint/adlint_pinit.h +1 -1
- data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +50 -42
- data/share/sample/vim-7.3/adlint/vim/GNUmakefile +1 -1
- data/share/sample/vim-7.3/adlint/vim/adlint_cinit.h +1 -1
- data/share/sample/vim-7.3/adlint/vim/adlint_pinit.h +1 -1
- data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +50 -42
- data/share/sample/vim-7.3/adlint/xxd/GNUmakefile +1 -1
- data/share/sample/vim-7.3/adlint/xxd/adlint_cinit.h +1 -1
- data/share/sample/vim-7.3/adlint/xxd/adlint_pinit.h +1 -1
- data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +49 -41
- data/share/sample/zsh-4.3.15/adlint/GNUmakefile +1 -1
- data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +46 -38
- data/share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile +1 -1
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +50 -42
- data/share/sample/zsh-4.3.15/adlint/core/GNUmakefile +1 -1
- data/share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +50 -42
- data/share/sample/zsh-4.3.15/adlint/modules/GNUmakefile +1 -1
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +50 -42
- data/share/sample/zsh-4.3.15/adlint/zle/GNUmakefile +1 -1
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h +1 -1
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +50 -42
- data/spec/adlint/{c → cc1}/ctrlexpr_spec.rb +51 -49
- data/spec/adlint/{c → cc1}/domain_spec.rb +210 -179
- data/spec/adlint/{c → cc1}/operator_spec.rb +3 -3
- data/spec/adlint/{c → cc1}/syntax_spec.rb +10 -12
- data/spec/adlint/{c → cc1}/type_spec.rb +61 -68
- data/{lib/adlint/c.rb → spec/adlint/location_spec.rb} +24 -29
- data/spec/conf.d/default_traits.yml +38 -37
- data/spec/conf.d/empty_cinit.h +1 -1
- data/spec/conf.d/empty_pinit.h +1 -1
- data/spec/conf.d/project/foo.c +0 -0
- data/spec/spec_helper.rb +2 -2
- metadata +60 -40
- data/lib/adlint/c/domain.rb +0 -7931
- data/lib/adlint/c/lexer.rb +0 -252
- data/lib/adlint/c/phase.rb +0 -135
- data/lib/adlint/exam/c_builtin/c_check.rb +0 -20745
- data/lib/adlint/exam/c_builtin/c_check_shima.rb +0 -983
- data/lib/adlint/exam/c_builtin/c_code.rb +0 -477
- data/lib/adlint/exam/c_builtin/c_metric.rb +0 -818
@@ -0,0 +1,226 @@
|
|
1
|
+
Feature: W0024
|
2
|
+
|
3
|
+
W0024 detects that a pointer variable appears in the increment or decrement
|
4
|
+
operation.
|
5
|
+
|
6
|
+
Scenario: postfix-increment-expression with a pointer variable
|
7
|
+
Given a target source named "fixture.c" with:
|
8
|
+
"""
|
9
|
+
const int *func(const int *p)
|
10
|
+
{
|
11
|
+
return p++; /* W0024 */
|
12
|
+
}
|
13
|
+
"""
|
14
|
+
When I successfully run `adlint fixture.c` on noarch
|
15
|
+
Then the output should exactly match with:
|
16
|
+
| mesg | line | column |
|
17
|
+
| W0117 | 1 | 12 |
|
18
|
+
| W0024 | 3 | 13 |
|
19
|
+
| W0628 | 1 | 12 |
|
20
|
+
|
21
|
+
Scenario: prefix-increment-expression with a pointer variable
|
22
|
+
Given a target source named "fixture.c" with:
|
23
|
+
"""
|
24
|
+
const int *func(const int *p)
|
25
|
+
{
|
26
|
+
return ++p; /* W0024 */
|
27
|
+
}
|
28
|
+
"""
|
29
|
+
When I successfully run `adlint fixture.c` on noarch
|
30
|
+
Then the output should exactly match with:
|
31
|
+
| mesg | line | column |
|
32
|
+
| W0117 | 1 | 12 |
|
33
|
+
| W0024 | 3 | 12 |
|
34
|
+
| W0424 | 3 | 14 |
|
35
|
+
| W0628 | 1 | 12 |
|
36
|
+
|
37
|
+
Scenario: a pointer variable as lhs of the additive-expression
|
38
|
+
Given a target source named "fixture.c" with:
|
39
|
+
"""
|
40
|
+
const int *func(const int * const p)
|
41
|
+
{
|
42
|
+
return p + 1; /* W0024 */
|
43
|
+
}
|
44
|
+
"""
|
45
|
+
When I successfully run `adlint fixture.c` on noarch
|
46
|
+
Then the output should exactly match with:
|
47
|
+
| mesg | line | column |
|
48
|
+
| W0117 | 1 | 12 |
|
49
|
+
| W9003 | 3 | 16 |
|
50
|
+
| W0024 | 3 | 14 |
|
51
|
+
| W0424 | 3 | 12 |
|
52
|
+
| W0628 | 1 | 12 |
|
53
|
+
|
54
|
+
Scenario: a pointer variable as rhs of the additive-expression
|
55
|
+
Given a target source named "fixture.c" with:
|
56
|
+
"""
|
57
|
+
const int *func(const int * const p)
|
58
|
+
{
|
59
|
+
return 1 + p; /* W0024 */
|
60
|
+
}
|
61
|
+
"""
|
62
|
+
When I successfully run `adlint fixture.c` on noarch
|
63
|
+
Then the output should exactly match with:
|
64
|
+
| mesg | line | column |
|
65
|
+
| W0117 | 1 | 12 |
|
66
|
+
| W9003 | 3 | 12 |
|
67
|
+
| W0024 | 3 | 14 |
|
68
|
+
| W0424 | 3 | 16 |
|
69
|
+
| W0628 | 1 | 12 |
|
70
|
+
|
71
|
+
Scenario: a pointer variable as lhs of the additive-expression
|
72
|
+
Given a target source named "fixture.c" with:
|
73
|
+
"""
|
74
|
+
const int *func(const int *p)
|
75
|
+
{
|
76
|
+
p = p + 1; /* W0024 */
|
77
|
+
return p;
|
78
|
+
}
|
79
|
+
"""
|
80
|
+
When I successfully run `adlint fixture.c` on noarch
|
81
|
+
Then the output should exactly match with:
|
82
|
+
| mesg | line | column |
|
83
|
+
| W0117 | 1 | 12 |
|
84
|
+
| W9003 | 3 | 14 |
|
85
|
+
| W0024 | 3 | 12 |
|
86
|
+
| W0424 | 3 | 10 |
|
87
|
+
| W0628 | 1 | 12 |
|
88
|
+
|
89
|
+
Scenario: postfix-decrement-expression with a pointer variable
|
90
|
+
Given a target source named "fixture.c" with:
|
91
|
+
"""
|
92
|
+
const int *func(const int *p)
|
93
|
+
{
|
94
|
+
return p--; /* W0024 */
|
95
|
+
}
|
96
|
+
"""
|
97
|
+
When I successfully run `adlint fixture.c` on noarch
|
98
|
+
Then the output should exactly match with:
|
99
|
+
| mesg | line | column |
|
100
|
+
| W0117 | 1 | 12 |
|
101
|
+
| W0024 | 3 | 13 |
|
102
|
+
| W0424 | 3 | 12 |
|
103
|
+
| W0628 | 1 | 12 |
|
104
|
+
|
105
|
+
Scenario: prefix-decrement-expression with a pointer variable
|
106
|
+
Given a target source named "fixture.c" with:
|
107
|
+
"""
|
108
|
+
const int *func(const int *p)
|
109
|
+
{
|
110
|
+
return --p; /* W0024 */
|
111
|
+
}
|
112
|
+
"""
|
113
|
+
When I successfully run `adlint fixture.c` on noarch
|
114
|
+
Then the output should exactly match with:
|
115
|
+
| mesg | line | column |
|
116
|
+
| W0117 | 1 | 12 |
|
117
|
+
| W0024 | 3 | 12 |
|
118
|
+
| W0424 | 3 | 14 |
|
119
|
+
| W0628 | 1 | 12 |
|
120
|
+
|
121
|
+
Scenario: a pointer variable as lhs of the additive-expression
|
122
|
+
Given a target source named "fixture.c" with:
|
123
|
+
"""
|
124
|
+
const int *func(const int * const p)
|
125
|
+
{
|
126
|
+
return p - 1; /* W0024 */
|
127
|
+
}
|
128
|
+
"""
|
129
|
+
When I successfully run `adlint fixture.c` on noarch
|
130
|
+
Then the output should exactly match with:
|
131
|
+
| mesg | line | column |
|
132
|
+
| W0117 | 1 | 12 |
|
133
|
+
| W9003 | 3 | 16 |
|
134
|
+
| W0024 | 3 | 14 |
|
135
|
+
| W0424 | 3 | 12 |
|
136
|
+
| W0628 | 1 | 12 |
|
137
|
+
|
138
|
+
Scenario: a pointer variable as rhs of the additive-expression
|
139
|
+
Given a target source named "fixture.c" with:
|
140
|
+
"""
|
141
|
+
const int *func(const int * const p)
|
142
|
+
{
|
143
|
+
return 1 - p; /* W0024 */
|
144
|
+
}
|
145
|
+
"""
|
146
|
+
When I successfully run `adlint fixture.c` on noarch
|
147
|
+
Then the output should exactly match with:
|
148
|
+
| mesg | line | column |
|
149
|
+
| W0117 | 1 | 12 |
|
150
|
+
| W9003 | 3 | 12 |
|
151
|
+
| W0024 | 3 | 14 |
|
152
|
+
| W0424 | 3 | 16 |
|
153
|
+
| W0628 | 1 | 12 |
|
154
|
+
|
155
|
+
Scenario: pointer variables are incremented and decremented
|
156
|
+
Given a target source named "fixture.c" with:
|
157
|
+
"""
|
158
|
+
const int *func(const int *p, const int *q)
|
159
|
+
{
|
160
|
+
return p++ & q--; /* W0024 */
|
161
|
+
}
|
162
|
+
"""
|
163
|
+
When I successfully run `adlint fixture.c` on noarch
|
164
|
+
Then the output should exactly match with:
|
165
|
+
| mesg | line | column |
|
166
|
+
| W0117 | 1 | 12 |
|
167
|
+
| W0024 | 3 | 13 |
|
168
|
+
| W0024 | 3 | 19 |
|
169
|
+
| W0424 | 3 | 18 |
|
170
|
+
| W0424 | 3 | 13 |
|
171
|
+
| W0424 | 3 | 19 |
|
172
|
+
| W0628 | 1 | 12 |
|
173
|
+
|
174
|
+
Scenario: pointer variables are incremented in arithmetic operations
|
175
|
+
Given a target source named "fixture.c" with:
|
176
|
+
"""
|
177
|
+
const int *func(const int *p, const int *q)
|
178
|
+
{
|
179
|
+
return (p++) * (q++); /* W0024 */
|
180
|
+
}
|
181
|
+
"""
|
182
|
+
When I successfully run `adlint fixture.c` on noarch
|
183
|
+
Then the output should exactly match with:
|
184
|
+
| mesg | line | column |
|
185
|
+
| W0117 | 1 | 12 |
|
186
|
+
| W0024 | 3 | 14 |
|
187
|
+
| W0024 | 3 | 22 |
|
188
|
+
| W0023 | 3 | 18 |
|
189
|
+
| W0424 | 3 | 12 |
|
190
|
+
| W0424 | 3 | 20 |
|
191
|
+
| W1052 | 3 | 18 |
|
192
|
+
| W0628 | 1 | 12 |
|
193
|
+
|
194
|
+
Scenario: pointer variable plus 2
|
195
|
+
Given a target source named "fixture.c" with:
|
196
|
+
"""
|
197
|
+
const int *func(const int * const p)
|
198
|
+
{
|
199
|
+
return p + 2; /* Ok but W0023 */
|
200
|
+
}
|
201
|
+
"""
|
202
|
+
When I successfully run `adlint fixture.c` on noarch
|
203
|
+
Then the output should exactly match with:
|
204
|
+
| mesg | line | column |
|
205
|
+
| W0117 | 1 | 12 |
|
206
|
+
| W9003 | 3 | 16 |
|
207
|
+
| W0023 | 3 | 14 |
|
208
|
+
| W0424 | 3 | 12 |
|
209
|
+
| W0628 | 1 | 12 |
|
210
|
+
|
211
|
+
Scenario: pointer variable minus 2
|
212
|
+
Given a target source named "fixture.c" with:
|
213
|
+
"""
|
214
|
+
const int *func(const int * const p)
|
215
|
+
{
|
216
|
+
return p - 2; /* Ok but W0023 */
|
217
|
+
}
|
218
|
+
"""
|
219
|
+
When I successfully run `adlint fixture.c` on noarch
|
220
|
+
Then the output should exactly match with:
|
221
|
+
| mesg | line | column |
|
222
|
+
| W0117 | 1 | 12 |
|
223
|
+
| W9003 | 3 | 16 |
|
224
|
+
| W0023 | 3 | 14 |
|
225
|
+
| W0424 | 3 | 12 |
|
226
|
+
| W0628 | 1 | 12 |
|
@@ -52,6 +52,9 @@ Feature: W0025
|
|
52
52
|
Then the output should exactly match with:
|
53
53
|
| mesg | line | column |
|
54
54
|
| W0025 | 3 | 1 |
|
55
|
+
| W0070 | 1 | 1 |
|
56
|
+
| W0070 | 2 | 1 |
|
57
|
+
| W0070 | 3 | 1 |
|
55
58
|
|
56
59
|
Scenario: no redundant #include of system header
|
57
60
|
Given a target source named "fixture.c" with:
|
@@ -62,3 +65,5 @@ Feature: W0025
|
|
62
65
|
When I successfully run `adlint fixture.c` on noarch
|
63
66
|
Then the output should exactly match with:
|
64
67
|
| mesg | line | column |
|
68
|
+
| W0070 | 1 | 1 |
|
69
|
+
| W0070 | 2 | 1 |
|
@@ -17,7 +17,7 @@ Feature: W0088
|
|
17
17
|
Then the output should exactly match with:
|
18
18
|
| mesg | line | column |
|
19
19
|
| W1076 | 1 | 12 |
|
20
|
-
| W0109 | 3 |
|
20
|
+
| W0109 | 3 | 13 |
|
21
21
|
| W0088 | 4 | 13 |
|
22
22
|
| W0100 | 3 | 9 |
|
23
23
|
| W0104 | 1 | 20 |
|
@@ -39,7 +39,7 @@ Feature: W0088
|
|
39
39
|
Then the output should exactly match with:
|
40
40
|
| mesg | line | column |
|
41
41
|
| W1076 | 1 | 12 |
|
42
|
-
| W0109 | 3 |
|
42
|
+
| W0109 | 3 | 13 |
|
43
43
|
| W0104 | 1 | 20 |
|
44
44
|
| W0629 | 1 | 12 |
|
45
45
|
| W0508 | 4 | 13 |
|
@@ -14,7 +14,7 @@ Feature: W0109
|
|
14
14
|
When I successfully run `adlint fixture.c` on noarch
|
15
15
|
Then the output should exactly match with:
|
16
16
|
| mesg | line | column |
|
17
|
-
| W0109 | 3 |
|
17
|
+
| W0109 | 3 | 12 |
|
18
18
|
|
19
19
|
Scenario: calling function is forward declared
|
20
20
|
Given a target source named "fixture.c" with:
|
@@ -44,5 +44,5 @@ Feature: W0109
|
|
44
44
|
When I successfully run `adlint fixture.c` on noarch
|
45
45
|
Then the output should exactly match with:
|
46
46
|
| mesg | line | column |
|
47
|
-
| W0109 | 3 |
|
47
|
+
| W0109 | 3 | 12 |
|
48
48
|
| W0118 | 6 | 12 |
|
@@ -24,7 +24,6 @@ Feature: W0477
|
|
24
24
|
When I successfully run `adlint fixture.c` on noarch
|
25
25
|
Then the output should exactly match with:
|
26
26
|
| mesg | line | column |
|
27
|
-
| W0480 | 1 | 1 |
|
28
27
|
|
29
28
|
Scenario: unpaired `()' in macro
|
30
29
|
Given a target source named "fixture.c" with:
|
@@ -48,7 +47,6 @@ Feature: W0477
|
|
48
47
|
When I successfully run `adlint fixture.c` on noarch
|
49
48
|
Then the output should exactly match with:
|
50
49
|
| mesg | line | column |
|
51
|
-
| W0480 | 1 | 1 |
|
52
50
|
|
53
51
|
Scenario: unpaired `{}' in macro
|
54
52
|
Given a target source named "fixture.c" with:
|
@@ -72,4 +70,3 @@ Feature: W0477
|
|
72
70
|
When I successfully run `adlint fixture.c` on noarch
|
73
71
|
Then the output should exactly match with:
|
74
72
|
| mesg | line | column |
|
75
|
-
| W0480 | 1 | 1 |
|
@@ -19,7 +19,7 @@ Feature: W0582
|
|
19
19
|
| mesg | line | column |
|
20
20
|
| W1076 | 1 | 13 |
|
21
21
|
| W0422 | 3 | 15 |
|
22
|
-
| W0109 | 3 |
|
22
|
+
| W0109 | 3 | 5 |
|
23
23
|
| W0104 | 1 | 22 |
|
24
24
|
| W0105 | 1 | 22 |
|
25
25
|
| W1073 | 3 | 8 |
|
@@ -40,7 +40,7 @@ Feature: W0582
|
|
40
40
|
Then the output should exactly match with:
|
41
41
|
| mesg | line | column |
|
42
42
|
| W1076 | 1 | 13 |
|
43
|
-
| W0109 | 3 |
|
43
|
+
| W0109 | 3 | 5 |
|
44
44
|
| W0104 | 1 | 22 |
|
45
45
|
| W0105 | 1 | 22 |
|
46
46
|
| W1073 | 3 | 8 |
|
@@ -63,7 +63,7 @@ Feature: W0582
|
|
63
63
|
| mesg | line | column |
|
64
64
|
| W1076 | 1 | 13 |
|
65
65
|
| W0422 | 3 | 12 |
|
66
|
-
| W0109 | 3 |
|
66
|
+
| W0109 | 3 | 5 |
|
67
67
|
| W0104 | 1 | 22 |
|
68
68
|
| W0105 | 1 | 22 |
|
69
69
|
| W1073 | 3 | 8 |
|
@@ -19,7 +19,7 @@ Feature: W0583
|
|
19
19
|
When I successfully run `adlint fixture.c` on noarch
|
20
20
|
Then the output should exactly match with:
|
21
21
|
| mesg | line | column |
|
22
|
-
| W0109 | 4 |
|
22
|
+
| W0109 | 4 | 12 |
|
23
23
|
| W0117 | 7 | 5 |
|
24
24
|
| W0422 | 8 | 12 |
|
25
25
|
| W0104 | 7 | 20 |
|
@@ -43,7 +43,7 @@ Feature: W0583
|
|
43
43
|
| mesg | line | column |
|
44
44
|
| W1076 | 1 | 13 |
|
45
45
|
| W0422 | 3 | 15 |
|
46
|
-
| W0109 | 3 |
|
46
|
+
| W0109 | 3 | 5 |
|
47
47
|
| W0104 | 1 | 22 |
|
48
48
|
| W0105 | 1 | 22 |
|
49
49
|
| W1073 | 3 | 8 |
|
@@ -54,7 +54,6 @@ Feature: W0583
|
|
54
54
|
| W0104 | 6 | 29 |
|
55
55
|
| W0105 | 6 | 22 |
|
56
56
|
| W0629 | 1 | 13 |
|
57
|
-
| W0629 | 6 | 13 |
|
58
57
|
| W0628 | 1 | 13 |
|
59
58
|
|
60
59
|
Scenario: call with unmatched arguments
|
@@ -73,7 +72,7 @@ Feature: W0583
|
|
73
72
|
Then the output should exactly match with:
|
74
73
|
| mesg | line | column |
|
75
74
|
| W1076 | 1 | 13 |
|
76
|
-
| W0109 | 3 |
|
75
|
+
| W0109 | 3 | 5 |
|
77
76
|
| W0104 | 1 | 22 |
|
78
77
|
| W0105 | 1 | 22 |
|
79
78
|
| W1073 | 3 | 8 |
|
@@ -85,7 +84,6 @@ Feature: W0583
|
|
85
84
|
| W0104 | 6 | 29 |
|
86
85
|
| W0105 | 6 | 22 |
|
87
86
|
| W0629 | 1 | 13 |
|
88
|
-
| W0629 | 6 | 13 |
|
89
87
|
| W0628 | 1 | 13 |
|
90
88
|
|
91
89
|
Scenario: call with unmatched constant pointer
|
@@ -104,7 +102,7 @@ Feature: W0583
|
|
104
102
|
Then the output should exactly match with:
|
105
103
|
| mesg | line | column |
|
106
104
|
| W1076 | 1 | 13 |
|
107
|
-
| W0109 | 3 |
|
105
|
+
| W0109 | 3 | 5 |
|
108
106
|
| W0104 | 1 | 22 |
|
109
107
|
| W0105 | 1 | 22 |
|
110
108
|
| W1073 | 3 | 8 |
|
@@ -116,5 +114,4 @@ Feature: W0583
|
|
116
114
|
| W0104 | 6 | 29 |
|
117
115
|
| W0105 | 6 | 22 |
|
118
116
|
| W0629 | 1 | 13 |
|
119
|
-
| W0629 | 6 | 13 |
|
120
117
|
| W0628 | 1 | 13 |
|
@@ -79,7 +79,6 @@ Feature: W0646
|
|
79
79
|
When I successfully run `adlint fixture.c` on noarch
|
80
80
|
Then the output should exactly match with:
|
81
81
|
| mesg | line | column |
|
82
|
-
| W0947 | 1 | 26 |
|
83
82
|
|
84
83
|
Scenario: a string-literal of wide characters followed by one of narrow
|
85
84
|
characters those are replaced by macros
|
@@ -105,6 +105,7 @@ Feature: W0705
|
|
105
105
|
| W0118 | 1 | 12 |
|
106
106
|
| W0117 | 3 | 5 |
|
107
107
|
| W9003 | 7 | 19 |
|
108
|
+
| W0023 | 7 | 17 |
|
108
109
|
| W9003 | 7 | 23 |
|
109
110
|
| W0024 | 7 | 21 |
|
110
111
|
| W0705 | 7 | 14 |
|
@@ -136,6 +137,7 @@ Feature: W0705
|
|
136
137
|
| W9003 | 6 | 11 |
|
137
138
|
| W0023 | 6 | 13 |
|
138
139
|
| W9003 | 6 | 19 |
|
140
|
+
| W0023 | 6 | 17 |
|
139
141
|
| W9003 | 6 | 23 |
|
140
142
|
| W0024 | 6 | 21 |
|
141
143
|
| W0705 | 6 | 10 |
|
@@ -245,6 +247,7 @@ Feature: W0705
|
|
245
247
|
| W0118 | 1 | 12 |
|
246
248
|
| W0117 | 3 | 5 |
|
247
249
|
| W9003 | 7 | 19 |
|
250
|
+
| W0023 | 7 | 17 |
|
248
251
|
| W9003 | 7 | 23 |
|
249
252
|
| W0024 | 7 | 21 |
|
250
253
|
| W0104 | 3 | 13 |
|
@@ -275,6 +278,7 @@ Feature: W0705
|
|
275
278
|
| W9003 | 6 | 11 |
|
276
279
|
| W0023 | 6 | 13 |
|
277
280
|
| W9003 | 6 | 19 |
|
281
|
+
| W0023 | 6 | 17 |
|
278
282
|
| W9003 | 6 | 23 |
|
279
283
|
| W0023 | 6 | 21 |
|
280
284
|
| W0104 | 3 | 14 |
|
@@ -306,7 +310,9 @@ Feature: W0705
|
|
306
310
|
| W0118 | 1 | 12 |
|
307
311
|
| W0117 | 3 | 5 |
|
308
312
|
| W9003 | 6 | 24 |
|
313
|
+
| W0023 | 6 | 21 |
|
309
314
|
| W9003 | 7 | 23 |
|
315
|
+
| W0023 | 7 | 21 |
|
310
316
|
| W9003 | 7 | 27 |
|
311
317
|
| W0024 | 7 | 25 |
|
312
318
|
| W0100 | 6 | 13 |
|
@@ -340,8 +346,10 @@ Feature: W0705
|
|
340
346
|
| W0118 | 1 | 12 |
|
341
347
|
| W0117 | 3 | 5 |
|
342
348
|
| W9003 | 6 | 23 |
|
349
|
+
| W0023 | 6 | 21 |
|
343
350
|
| W0705 | 6 | 18 |
|
344
351
|
| W9003 | 7 | 23 |
|
352
|
+
| W0023 | 7 | 21 |
|
345
353
|
| W9003 | 7 | 27 |
|
346
354
|
| W0024 | 7 | 25 |
|
347
355
|
| W0100 | 6 | 13 |
|