adlint 1.18.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +287 -188
- data/MANIFEST +278 -92
- data/NEWS +16 -4
- data/bin/adlintize +124 -3
- data/etc/conf.d/fallback/traits.erb +54 -1
- data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +54 -1
- data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +54 -1
- data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +54 -1
- data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +54 -1
- data/etc/mesg.d/c_builtin/en_US/messages.yml +2998 -0
- data/etc/mesg.d/c_builtin/ja_JP/messages.yml +2998 -0
- data/etc/mesg.d/core/en_US/messages.yml +134 -0
- data/etc/mesg.d/core/ja_JP/messages.yml +134 -0
- data/features/{message_detection → code_check}/E0013.feature +2 -2
- data/features/{message_detection → code_check}/W0001.feature +4 -4
- data/features/{message_detection → code_check}/W0002.feature +6 -6
- data/features/{message_detection → code_check}/W0003.feature +8 -8
- data/features/{message_detection → code_check}/W0007.feature +16 -16
- data/features/{message_detection → code_check}/W0010.feature +8 -8
- data/features/{message_detection → code_check}/W0013.feature +16 -16
- data/features/code_check/W0016.feature +200 -0
- data/features/code_check/W0017.feature +270 -0
- data/features/code_check/W0025.feature +66 -0
- data/features/code_check/W0026.feature +143 -0
- data/features/{message_detection → code_check}/W0093.feature +6 -6
- data/features/{message_detection → code_check}/W0104.feature +14 -14
- data/features/{message_detection → code_check}/W0109.feature +6 -6
- data/features/code_check/W0119.feature +151 -0
- data/features/code_check/W0120.feature +137 -0
- data/features/code_check/W0121.feature +147 -0
- data/features/code_check/W0122.feature +142 -0
- data/features/code_check/W0123.feature +147 -0
- data/features/code_check/W0124.feature +142 -0
- data/features/code_check/W0125.feature +147 -0
- data/features/code_check/W0126.feature +142 -0
- data/features/code_check/W0127.feature +147 -0
- data/features/code_check/W0128.feature +147 -0
- data/features/code_check/W0129.feature +147 -0
- data/features/code_check/W0130.feature +159 -0
- data/features/code_check/W0131.feature +154 -0
- data/features/code_check/W0132.feature +137 -0
- data/features/code_check/W0133.feature +151 -0
- data/features/code_check/W0134.feature +151 -0
- data/features/code_check/W0135.feature +147 -0
- data/features/code_check/W0136.feature +151 -0
- data/features/code_check/W0137.feature +147 -0
- data/features/code_check/W0138.feature +151 -0
- data/features/code_check/W0139.feature +147 -0
- data/features/code_check/W0140.feature +159 -0
- data/features/code_check/W0141.feature +155 -0
- data/features/code_check/W0142.feature +152 -0
- data/features/code_check/W0143.feature +147 -0
- data/features/code_check/W0144.feature +146 -0
- data/features/code_check/W0145.feature +147 -0
- data/features/code_check/W0146.feature +146 -0
- data/features/code_check/W0147.feature +146 -0
- data/features/code_check/W0148.feature +147 -0
- data/features/code_check/W0149.feature +146 -0
- data/features/code_check/W0150.feature +146 -0
- data/features/code_check/W0151.feature +146 -0
- data/features/code_check/W0152.feature +155 -0
- data/features/code_check/W0153.feature +155 -0
- data/features/code_check/W0154.feature +154 -0
- data/features/code_check/W0155.feature +154 -0
- data/features/code_check/W0156.feature +167 -0
- data/features/code_check/W0157.feature +152 -0
- data/features/code_check/W0158.feature +147 -0
- data/features/code_check/W0159.feature +147 -0
- data/features/code_check/W0160.feature +147 -0
- data/features/code_check/W0161.feature +151 -0
- data/features/code_check/W0162.feature +146 -0
- data/features/code_check/W0163.feature +146 -0
- data/features/code_check/W0164.feature +146 -0
- data/features/code_check/W0165.feature +151 -0
- data/features/code_check/W0166.feature +146 -0
- data/features/code_check/W0167.feature +146 -0
- data/features/code_check/W0168.feature +146 -0
- data/features/code_check/W0169.feature +151 -0
- data/features/code_check/W0170.feature +146 -0
- data/features/code_check/W0171.feature +146 -0
- data/features/code_check/W0172.feature +146 -0
- data/features/code_check/W0173.feature +159 -0
- data/features/code_check/W0174.feature +159 -0
- data/features/code_check/W0175.feature +158 -0
- data/features/code_check/W0176.feature +158 -0
- data/features/code_check/W0177.feature +159 -0
- data/features/code_check/W0178.feature +155 -0
- data/features/code_check/W0179.feature +154 -0
- data/features/code_check/W0180.feature +154 -0
- data/features/code_check/W0181.feature +167 -0
- data/features/code_check/W0182.feature +147 -0
- data/features/code_check/W0183.feature +147 -0
- data/features/code_check/W0184.feature +148 -0
- data/features/code_check/W0185.feature +142 -0
- data/features/code_check/W0186.feature +142 -0
- data/features/code_check/W0187.feature +142 -0
- data/features/code_check/W0188.feature +142 -0
- data/features/code_check/W0189.feature +142 -0
- data/features/code_check/W0190.feature +142 -0
- data/features/code_check/W0191.feature +142 -0
- data/features/code_check/W0192.feature +142 -0
- data/features/code_check/W0193.feature +143 -0
- data/features/code_check/W0194.feature +142 -0
- data/features/code_check/W0195.feature +142 -0
- data/features/code_check/W0196.feature +142 -0
- data/features/code_check/W0197.feature +142 -0
- data/features/code_check/W0198.feature +142 -0
- data/features/code_check/W0199.feature +143 -0
- data/features/code_check/W0200.feature +142 -0
- data/features/code_check/W0201.feature +142 -0
- data/features/code_check/W0202.feature +142 -0
- data/features/code_check/W0203.feature +142 -0
- data/features/code_check/W0204.feature +142 -0
- data/features/code_check/W0205.feature +143 -0
- data/features/code_check/W0206.feature +150 -0
- data/features/code_check/W0207.feature +150 -0
- data/features/code_check/W0208.feature +150 -0
- data/features/code_check/W0209.feature +151 -0
- data/features/code_check/W0210.feature +151 -0
- data/features/code_check/W0211.feature +151 -0
- data/features/code_check/W0212.feature +147 -0
- data/features/code_check/W0213.feature +142 -0
- data/features/code_check/W0214.feature +147 -0
- data/features/code_check/W0215.feature +142 -0
- data/features/code_check/W0216.feature +142 -0
- data/features/code_check/W0217.feature +142 -0
- data/features/code_check/W0218.feature +142 -0
- data/features/code_check/W0219.feature +142 -0
- data/features/code_check/W0220.feature +142 -0
- data/features/code_check/W0221.feature +147 -0
- data/features/code_check/W0222.feature +142 -0
- data/features/code_check/W0223.feature +147 -0
- data/features/code_check/W0224.feature +142 -0
- data/features/code_check/W0225.feature +142 -0
- data/features/code_check/W0226.feature +142 -0
- data/features/code_check/W0227.feature +142 -0
- data/features/code_check/W0228.feature +142 -0
- data/features/code_check/W0229.feature +142 -0
- data/features/code_check/W0230.feature +147 -0
- data/features/code_check/W0231.feature +142 -0
- data/features/code_check/W0232.feature +148 -0
- data/features/code_check/W0233.feature +142 -0
- data/features/code_check/W0234.feature +143 -0
- data/features/code_check/W0235.feature +142 -0
- data/features/code_check/W0236.feature +143 -0
- data/features/code_check/W0237.feature +142 -0
- data/features/code_check/W0238.feature +143 -0
- data/features/code_check/W0239.feature +154 -0
- data/features/code_check/W0240.feature +155 -0
- data/features/code_check/W0241.feature +154 -0
- data/features/code_check/W0242.feature +155 -0
- data/features/code_check/W0243.feature +154 -0
- data/features/code_check/W0244.feature +155 -0
- data/features/code_check/W0245.feature +147 -0
- data/features/code_check/W0246.feature +147 -0
- data/features/code_check/W0247.feature +147 -0
- data/features/code_check/W0248.feature +142 -0
- data/features/code_check/W0249.feature +142 -0
- data/features/code_check/W0250.feature +146 -0
- data/features/code_check/W0251.feature +159 -0
- data/features/code_check/W0252.feature +155 -0
- data/features/code_check/W0253.feature +154 -0
- data/features/code_check/W0254.feature +154 -0
- data/features/code_check/W0477.feature +77 -0
- data/features/code_check/W0478.feature +103 -0
- data/features/code_check/W0479.feature +65 -0
- data/features/code_check/W0480.feature +119 -0
- data/features/code_check/W0481.feature +28 -0
- data/features/code_check/W0482.feature +64 -0
- data/features/code_check/W0483.feature +62 -0
- data/features/code_check/W0573.feature +91 -0
- data/features/{message_detection → code_check}/W0583.feature +2 -2
- data/features/{message_detection → code_check}/W0606.feature +2 -2
- data/features/{message_detection → code_check}/W0641.feature +16 -16
- data/features/{message_detection → code_check}/W0643.feature +12 -12
- data/features/{message_detection → code_check}/W0644.feature +50 -50
- data/features/{message_detection → code_check}/W0645.feature +16 -16
- data/features/{message_detection → code_check}/W0646.feature +16 -16
- data/features/{message_detection → code_check}/W0649.feature +28 -28
- data/features/{message_detection → code_check}/W0650.feature +24 -24
- data/features/code_check/W0685.feature +120 -0
- data/features/code_check/W0686.feature +92 -0
- data/features/{message_detection → code_check}/W0687.feature +4 -4
- data/features/{message_detection → code_check}/W0688.feature +12 -12
- data/features/{message_detection → code_check}/W0689.feature +8 -8
- data/features/{message_detection → code_check}/W0690.feature +6 -6
- data/features/{message_detection → code_check}/W0691.feature +14 -14
- data/features/{message_detection → code_check}/W0692.feature +4 -4
- data/features/{message_detection → code_check}/W0694.feature +10 -10
- data/features/code_check/W0695.feature +78 -0
- data/features/{message_detection → code_check}/W0697.feature +18 -18
- data/features/{message_detection → code_check}/W0698.feature +2 -2
- data/features/{message_detection → code_check}/W0699.feature +2 -2
- data/features/{message_detection → code_check}/W0700.feature +6 -6
- data/features/{message_detection → code_check}/W0703.feature +6 -6
- data/features/{message_detection → code_check}/W0705.feature +24 -24
- data/features/{message_detection → code_check}/W0707.feature +20 -20
- data/features/{message_detection → code_check}/W0711.feature +10 -10
- data/features/{message_detection → code_check}/W0712.feature +10 -10
- data/features/{message_detection → code_check}/W0713.feature +10 -10
- data/features/{message_detection → code_check}/W0714.feature +10 -10
- data/features/{message_detection → code_check}/W0715.feature +11 -11
- data/features/{message_detection → code_check}/W0716.feature +6 -6
- data/features/{message_detection → code_check}/W0717.feature +6 -6
- data/features/{message_detection → code_check}/W0718.feature +6 -6
- data/features/{message_detection → code_check}/W0719.feature +16 -16
- data/features/{message_detection → code_check}/W0723.feature +6 -6
- data/features/code_check/W0726.feature +95 -0
- data/features/{message_detection → code_check}/W0732.feature +6 -6
- data/features/{message_detection → code_check}/W0733.feature +6 -6
- data/features/{message_detection → code_check}/W0734.feature +16 -16
- data/features/{message_detection → code_check}/W0735.feature +16 -16
- data/features/{message_detection → code_check}/W0745.feature +10 -10
- data/features/code_check/W0747.feature +146 -0
- data/features/code_check/W0748.feature +148 -0
- data/features/code_check/W0749.feature +146 -0
- data/features/code_check/W0750.feature +146 -0
- data/features/code_check/W0751.feature +148 -0
- data/features/code_check/W0752.feature +143 -0
- data/features/code_check/W0753.feature +146 -0
- data/features/code_check/W0754.feature +146 -0
- data/features/code_check/W0755.feature +142 -0
- data/features/code_check/W0756.feature +148 -0
- data/features/code_check/W0757.feature +143 -0
- data/features/code_check/W0758.feature +143 -0
- data/features/code_check/W0759.feature +154 -0
- data/features/code_check/W0760.feature +154 -0
- data/features/code_check/W0761.feature +154 -0
- data/features/code_check/W0762.feature +154 -0
- data/features/code_check/W0763.feature +156 -0
- data/features/code_check/W0764.feature +151 -0
- data/features/code_check/W0765.feature +151 -0
- data/features/code_check/W0766.feature +151 -0
- data/features/code_check/W0767.feature +142 -0
- data/features/code_check/W0768.feature +142 -0
- data/features/code_check/W0769.feature +142 -0
- data/features/{message_detection → code_check}/W0780.feature +12 -12
- data/features/code_check/W0781.feature +145 -0
- data/features/{message_detection → code_check}/W0783.feature +8 -8
- data/features/{message_detection → code_check}/W0792.feature +16 -16
- data/features/{message_detection → code_check}/W0793.feature +16 -16
- data/features/{message_detection → code_check}/W0794.feature +10 -10
- data/features/code_check/W0801.feature +84 -0
- data/features/{message_detection → code_check}/W0805.feature +14 -14
- data/features/code_check/W0806.feature +24 -0
- data/features/code_check/W0807.feature +35 -0
- data/features/code_check/W0808.feature +34 -0
- data/features/code_check/W0809.feature +114 -0
- data/features/{message_detection → code_check}/W0811.feature +10 -10
- data/features/{message_detection → code_check}/W0830.feature +12 -12
- data/features/{message_detection → code_check}/W0833.feature +30 -30
- data/features/{message_detection → code_check}/W0834.feature +26 -26
- data/features/{message_detection → code_check}/W1026.feature +8 -8
- data/features/code_check/W1030.feature +84 -0
- data/features/{message_detection → code_check}/W1031.feature +36 -36
- data/features/{message_detection → code_check}/W1039.feature +24 -24
- data/features/{message_detection → code_check}/W1040.feature +8 -8
- data/features/{message_detection → code_check}/W1041.feature +2 -2
- data/features/{message_detection → code_check}/W1046.feature +6 -6
- data/features/{message_detection → code_check}/W1047.feature +12 -12
- data/features/{message_detection → code_check}/W1052.feature +6 -6
- data/features/{message_detection → code_check}/W1066.feature +6 -6
- data/features/{message_detection → code_check}/W1067.feature +6 -6
- data/features/{message_detection → code_check}/W1068.feature +6 -6
- data/features/{message_detection → code_check}/W1069.feature +10 -10
- data/features/{message_detection → code_check}/W1070.feature +15 -15
- data/features/{message_detection → code_check}/W1071.feature +8 -8
- data/features/{message_detection → code_check}/W1072.feature +2 -2
- data/features/{message_detection → code_check}/W1073.feature +14 -14
- data/features/{message_detection → code_check}/W1074.feature +10 -10
- data/features/{message_detection → code_check}/W1075.feature +10 -10
- data/features/{message_detection → code_check}/W1076.feature +8 -8
- data/features/{message_detection → code_check}/W1077.feature +18 -18
- data/features/{message_detection → code_check}/W9001.feature +2 -2
- data/features/{message_detection → code_check}/W9003.feature +12 -12
- data/features/step_definitions/{message_detection_steps.rb → code_check_steps.rb} +1 -1
- data/features/support/env.rb +19 -3
- data/lib/adlint.rb +1 -0
- data/lib/adlint/analyzer.rb +17 -1
- data/lib/adlint/c.rb +0 -4
- data/lib/adlint/c/phase.rb +55 -745
- data/lib/adlint/code.rb +0 -24
- data/lib/adlint/cpp.rb +0 -3
- data/lib/adlint/cpp/phase.rb +50 -112
- data/lib/adlint/driver.rb +2 -2
- data/lib/adlint/error.rb +4 -4
- data/lib/adlint/exam.rb +143 -0
- data/lib/adlint/exam/c_builtin.rb +813 -0
- data/lib/adlint/{c/message.rb → exam/c_builtin/c_check.rb} +2130 -798
- data/lib/adlint/{c/message_shima.rb → exam/c_builtin/c_check_shima.rb} +99 -28
- data/lib/adlint/{c/code.rb → exam/c_builtin/c_code.rb} +31 -5
- data/lib/adlint/{c/metric.rb → exam/c_builtin/c_metric.rb} +43 -11
- data/lib/adlint/{cpp/message.rb → exam/c_builtin/cpp_check.rb} +177 -73
- data/lib/adlint/{cpp/message_shima.rb → exam/c_builtin/cpp_check_shima.rb} +28 -8
- data/lib/adlint/{cpp/code.rb → exam/c_builtin/cpp_code.rb} +14 -3
- data/lib/adlint/{ld/message.rb → exam/c_builtin/ld_check.rb} +33 -12
- data/lib/adlint/{ld/metric.rb → exam/c_builtin/ld_metric.rb} +8 -3
- data/lib/adlint/lang.rb +2 -2
- data/lib/adlint/ld.rb +0 -2
- data/lib/adlint/ld/phase.rb +101 -101
- data/lib/adlint/message.rb +155 -98
- data/lib/adlint/metric.rb +0 -27
- data/lib/adlint/phase.rb +28 -3
- data/lib/adlint/report.rb +22 -12
- data/lib/adlint/traits.rb +97 -5
- data/lib/adlint/util.rb +100 -11
- data/lib/adlint/version.rb +5 -5
- data/share/doc/developers_guide_ja.html +3 -3
- data/share/doc/developers_guide_ja.texi +1 -1
- data/share/doc/users_guide_en.html +1817 -1648
- data/share/doc/users_guide_en.texi +202 -22
- data/share/doc/users_guide_ja.html +1836 -1663
- data/share/doc/users_guide_ja.texi +203 -20
- data/share/sample/bison-2.5/adlint/adlint_traits.yml +55 -2
- data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +47 -2
- data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +47 -2
- data/share/sample/ctags-5.8/adlint/adlint_traits.yml +47 -2
- data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +47 -2
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +47 -2
- data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +47 -2
- data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +47 -2
- data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +47 -2
- data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +47 -2
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +47 -2
- data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +47 -2
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +47 -2
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +47 -2
- data/spec/conf.d/default_traits.yml +56 -3
- metadata +280 -94
- data/etc/mesg.d/en_US/messages.yml +0 -797
- data/etc/mesg.d/ja_JP/messages.yml +0 -797
@@ -3,14 +3,14 @@ Feature: W0794
|
|
3
3
|
W0794 detects that a value of the signed integer variable is shifted to left.
|
4
4
|
|
5
5
|
Scenario: left shifting a `signed int' value
|
6
|
-
Given a target source named "
|
6
|
+
Given a target source named "fixture.c" with:
|
7
7
|
"""
|
8
8
|
int func(int i)
|
9
9
|
{
|
10
10
|
return i << 1; /* W0794 */
|
11
11
|
}
|
12
12
|
"""
|
13
|
-
When I successfully run `adlint
|
13
|
+
When I successfully run `adlint fixture.c` on noarch
|
14
14
|
Then the output should exactly match with:
|
15
15
|
| mesg | line | column |
|
16
16
|
| W0117 | 1 | 5 |
|
@@ -21,14 +21,14 @@ Feature: W0794
|
|
21
21
|
| W0628 | 1 | 5 |
|
22
22
|
|
23
23
|
Scenario: right shifting a `signed int' value
|
24
|
-
Given a target source named "
|
24
|
+
Given a target source named "fixture.c" with:
|
25
25
|
"""
|
26
26
|
int func(int i)
|
27
27
|
{
|
28
28
|
return i >> 1; /* OK */
|
29
29
|
}
|
30
30
|
"""
|
31
|
-
When I successfully run `adlint
|
31
|
+
When I successfully run `adlint fixture.c` on noarch
|
32
32
|
Then the output should exactly match with:
|
33
33
|
| mesg | line | column |
|
34
34
|
| W0117 | 1 | 5 |
|
@@ -38,14 +38,14 @@ Feature: W0794
|
|
38
38
|
| W0628 | 1 | 5 |
|
39
39
|
|
40
40
|
Scenario: left shifting an `unsigned int' value
|
41
|
-
Given a target source named "
|
41
|
+
Given a target source named "fixture.c" with:
|
42
42
|
"""
|
43
43
|
unsigned int func(unsigned int ui)
|
44
44
|
{
|
45
45
|
return ui << 1; /* OK */
|
46
46
|
}
|
47
47
|
"""
|
48
|
-
When I successfully run `adlint
|
48
|
+
When I successfully run `adlint fixture.c` on noarch
|
49
49
|
Then the output should exactly match with:
|
50
50
|
| mesg | line | column |
|
51
51
|
| W0117 | 1 | 14 |
|
@@ -54,14 +54,14 @@ Feature: W0794
|
|
54
54
|
| W0628 | 1 | 14 |
|
55
55
|
|
56
56
|
Scenario: left shifting a `signed int' constant
|
57
|
-
Given a target source named "
|
57
|
+
Given a target source named "fixture.c" with:
|
58
58
|
"""
|
59
59
|
int func(void)
|
60
60
|
{
|
61
61
|
return 123 << 1; /* OK */
|
62
62
|
}
|
63
63
|
"""
|
64
|
-
When I successfully run `adlint
|
64
|
+
When I successfully run `adlint fixture.c` on noarch
|
65
65
|
Then the output should exactly match with:
|
66
66
|
| mesg | line | column |
|
67
67
|
| W0117 | 1 | 5 |
|
@@ -70,14 +70,14 @@ Feature: W0794
|
|
70
70
|
|
71
71
|
Scenario: left shifting an `unsigned char' value which will be
|
72
72
|
integer-promoted to `signed int'
|
73
|
-
Given a target source named "
|
73
|
+
Given a target source named "fixture.c" with:
|
74
74
|
"""
|
75
75
|
int func(unsigned char uc)
|
76
76
|
{
|
77
77
|
return uc << 1; /* OK */
|
78
78
|
}
|
79
79
|
"""
|
80
|
-
When I successfully run `adlint
|
80
|
+
When I successfully run `adlint fixture.c` on noarch
|
81
81
|
Then the output should exactly match with:
|
82
82
|
| mesg | line | column |
|
83
83
|
| W0117 | 1 | 5 |
|
@@ -0,0 +1,84 @@
|
|
1
|
+
Feature: W0801
|
2
|
+
|
3
|
+
W0801 detects that there is no named member in this struct or union.
|
4
|
+
|
5
|
+
Scenario: no member exists in the struct
|
6
|
+
Given a target source named "fixture.c" with:
|
7
|
+
"""
|
8
|
+
struct foo { /* W0801 */
|
9
|
+
};
|
10
|
+
"""
|
11
|
+
When I successfully run `adlint fixture.c` on noarch
|
12
|
+
Then the output should exactly match with:
|
13
|
+
| mesg | line | column |
|
14
|
+
| W0801 | 1 | 8 |
|
15
|
+
|
16
|
+
Scenario: no named member exists in the struct
|
17
|
+
Given a target source named "fixture.c" with:
|
18
|
+
"""
|
19
|
+
struct bar { /* W0801 */
|
20
|
+
int;
|
21
|
+
int :1;
|
22
|
+
long;
|
23
|
+
double;
|
24
|
+
};
|
25
|
+
"""
|
26
|
+
When I successfully run `adlint fixture.c` on noarch
|
27
|
+
Then the output should exactly match with:
|
28
|
+
| mesg | line | column |
|
29
|
+
| W0801 | 1 | 8 |
|
30
|
+
|
31
|
+
Scenario: named member exists in the struct
|
32
|
+
Given a target source named "fixture.c" with:
|
33
|
+
"""
|
34
|
+
struct baz { /* OK */
|
35
|
+
int i;
|
36
|
+
long l;
|
37
|
+
double d;
|
38
|
+
};
|
39
|
+
"""
|
40
|
+
When I successfully run `adlint fixture.c` on noarch
|
41
|
+
Then the output should exactly match with:
|
42
|
+
| mesg | line | column |
|
43
|
+
|
44
|
+
Scenario: no member exists in the union
|
45
|
+
Given a target source named "fixture.c" with:
|
46
|
+
"""
|
47
|
+
union foo { /* W0801 */
|
48
|
+
};
|
49
|
+
"""
|
50
|
+
When I successfully run `adlint fixture.c` on noarch
|
51
|
+
Then the output should exactly match with:
|
52
|
+
| mesg | line | column |
|
53
|
+
| W0551 | 1 | 7 |
|
54
|
+
| W0801 | 1 | 7 |
|
55
|
+
|
56
|
+
Scenario: no named member exists in the union
|
57
|
+
Given a target source named "fixture.c" with:
|
58
|
+
"""
|
59
|
+
union bar { /* W0801 */
|
60
|
+
int;
|
61
|
+
int :1;
|
62
|
+
long;
|
63
|
+
};
|
64
|
+
"""
|
65
|
+
When I successfully run `adlint fixture.c` on noarch
|
66
|
+
Then the output should exactly match with:
|
67
|
+
| mesg | line | column |
|
68
|
+
| W0551 | 1 | 7 |
|
69
|
+
| W0801 | 1 | 7 |
|
70
|
+
|
71
|
+
Scenario: named member exists in the union
|
72
|
+
Given a target source named "fixture.c" with:
|
73
|
+
"""
|
74
|
+
union baz { /* OK */
|
75
|
+
int i;
|
76
|
+
long l;
|
77
|
+
};
|
78
|
+
"""
|
79
|
+
When I successfully run `adlint fixture.c` on noarch
|
80
|
+
Then the output should exactly match with:
|
81
|
+
| mesg | line | column |
|
82
|
+
| W0551 | 1 | 7 |
|
83
|
+
|
84
|
+
# vim:ts=2:sw=2:sts=2:et:
|
@@ -3,26 +3,26 @@ Feature: W0805
|
|
3
3
|
W0805 detects that no identifier as argument for the `defined' operator.
|
4
4
|
|
5
5
|
Scenario: no arguments
|
6
|
-
Given a target source named "
|
6
|
+
Given a target source named "fixture.c" with:
|
7
7
|
"""
|
8
8
|
#if defined /* OK */
|
9
9
|
int i = 0;
|
10
10
|
#endif
|
11
11
|
"""
|
12
|
-
When I successfully run `adlint
|
12
|
+
When I successfully run `adlint fixture.c` on noarch
|
13
13
|
Then the output should exactly match with:
|
14
14
|
| mesg | line | column |
|
15
15
|
| E0007 | 1 | |
|
16
16
|
| W0804 | 1 | 5 |
|
17
17
|
|
18
18
|
Scenario: an argument specified but not an identifier
|
19
|
-
Given a target source named "
|
19
|
+
Given a target source named "fixture.c" with:
|
20
20
|
"""
|
21
21
|
#if defined "foo" /* W0805 */
|
22
22
|
int i = 0;
|
23
23
|
#endif
|
24
24
|
"""
|
25
|
-
When I successfully run `adlint
|
25
|
+
When I successfully run `adlint fixture.c` on noarch
|
26
26
|
Then the output should exactly match with:
|
27
27
|
| mesg | line | column |
|
28
28
|
| E0007 | 1 | 13 |
|
@@ -30,48 +30,48 @@ Feature: W0805
|
|
30
30
|
| W0805 | 1 | 5 |
|
31
31
|
|
32
32
|
Scenario: an identifier specified
|
33
|
-
Given a target source named "
|
33
|
+
Given a target source named "fixture.c" with:
|
34
34
|
"""
|
35
35
|
#if defined FOO /* OK */
|
36
36
|
int i = 0;
|
37
37
|
#endif
|
38
38
|
"""
|
39
|
-
When I successfully run `adlint
|
39
|
+
When I successfully run `adlint fixture.c` on noarch
|
40
40
|
Then the output should exactly match with:
|
41
41
|
| mesg | line | column |
|
42
42
|
|
43
43
|
Scenario: an identifier specified in parenthesis
|
44
|
-
Given a target source named "
|
44
|
+
Given a target source named "fixture.c" with:
|
45
45
|
"""
|
46
46
|
#if defined(FOO) /* OK */
|
47
47
|
int i = 0;
|
48
48
|
#endif
|
49
49
|
"""
|
50
|
-
When I successfully run `adlint
|
50
|
+
When I successfully run `adlint fixture.c` on noarch
|
51
51
|
Then the output should exactly match with:
|
52
52
|
| mesg | line | column |
|
53
53
|
|
54
54
|
Scenario: no arguments for latter `defined' operator
|
55
|
-
Given a target source named "
|
55
|
+
Given a target source named "fixture.c" with:
|
56
56
|
"""
|
57
57
|
#if defined(FOO) && defined /* OK */
|
58
58
|
int i = 0;
|
59
59
|
#endif
|
60
60
|
"""
|
61
|
-
When I successfully run `adlint
|
61
|
+
When I successfully run `adlint fixture.c` on noarch
|
62
62
|
Then the output should exactly match with:
|
63
63
|
| mesg | line | column |
|
64
64
|
| E0007 | 1 | |
|
65
65
|
| W0804 | 1 | 21 |
|
66
66
|
|
67
67
|
Scenario: non identifier for latter `defined' operator
|
68
|
-
Given a target source named "
|
68
|
+
Given a target source named "fixture.c" with:
|
69
69
|
"""
|
70
70
|
#if defined(FOO) && defined "foo" /* W0805 */
|
71
71
|
int i = 0;
|
72
72
|
#endif
|
73
73
|
"""
|
74
|
-
When I successfully run `adlint
|
74
|
+
When I successfully run `adlint fixture.c` on noarch
|
75
75
|
Then the output should exactly match with:
|
76
76
|
| mesg | line | column |
|
77
77
|
| E0007 | 1 | 29 |
|
@@ -79,13 +79,13 @@ Feature: W0805
|
|
79
79
|
| W0805 | 1 | 21 |
|
80
80
|
|
81
81
|
Scenario: identifiers for two `defined' operator
|
82
|
-
Given a target source named "
|
82
|
+
Given a target source named "fixture.c" with:
|
83
83
|
"""
|
84
84
|
#if defined(FOO) && defined BAR /* OK */
|
85
85
|
int i = 0;
|
86
86
|
#endif
|
87
87
|
"""
|
88
|
-
When I successfully run `adlint
|
88
|
+
When I successfully run `adlint fixture.c` on noarch
|
89
89
|
Then the output should exactly match with:
|
90
90
|
| mesg | line | column |
|
91
91
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Feature: W0806
|
2
|
+
|
3
|
+
W0806 detects that the macro named `defined' is defined.
|
4
|
+
|
5
|
+
Scenario: a macro named `defined' is defined
|
6
|
+
Given a target source named "fixture.c" with:
|
7
|
+
"""
|
8
|
+
#define defined !defined /* W0806 */
|
9
|
+
"""
|
10
|
+
When I successfully run `adlint fixture.c` on noarch
|
11
|
+
Then the output should exactly match with:
|
12
|
+
| mesg | line | column |
|
13
|
+
| W0806 | 1 | 9 |
|
14
|
+
|
15
|
+
Scenario: a macro named `define' is defined
|
16
|
+
Given a target source named "fixture.c" with:
|
17
|
+
"""
|
18
|
+
#define define !define /* OK */
|
19
|
+
"""
|
20
|
+
When I successfully run `adlint fixture.c` on noarch
|
21
|
+
Then the output should exactly match with:
|
22
|
+
| mesg | line | column |
|
23
|
+
|
24
|
+
# vim:ts=2:sw=2:sts=2:et:
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Feature: W0807
|
2
|
+
|
3
|
+
W0807 detects that it undefined the macro defined as pre-defined.
|
4
|
+
|
5
|
+
Scenario: undefine the macro defined as pre-defined
|
6
|
+
Given a target source named "fixture.c" with:
|
7
|
+
"""
|
8
|
+
#undef __STDC_VERSION__ /* W0807 */
|
9
|
+
#undef __LINE__ /* W0807 */
|
10
|
+
#undef __FILE__ /* W0807 */
|
11
|
+
#undef __DATE__ /* W0807 */
|
12
|
+
#undef __TIME__ /* W0807 */
|
13
|
+
#undef __STDC__ /* W0807 */
|
14
|
+
"""
|
15
|
+
When I successfully run `adlint fixture.c` on noarch
|
16
|
+
Then the output should exactly match with:
|
17
|
+
| mesg | line | column |
|
18
|
+
| W0807 | 1 | 8 |
|
19
|
+
| W0807 | 2 | 8 |
|
20
|
+
| W0807 | 3 | 8 |
|
21
|
+
| W0807 | 4 | 8 |
|
22
|
+
| W0807 | 5 | 8 |
|
23
|
+
| W0807 | 6 | 8 |
|
24
|
+
|
25
|
+
Scenario: undefine the macro defined by the user
|
26
|
+
Given a target source named "fixture.c" with:
|
27
|
+
"""
|
28
|
+
#define LINE !LINE
|
29
|
+
#undef LINE
|
30
|
+
"""
|
31
|
+
When I successfully run `adlint fixture.c` on noarch
|
32
|
+
Then the output should exactly match with:
|
33
|
+
| mesg | line | column |
|
34
|
+
|
35
|
+
# vim:ts=2:sw=2:sts=2:et:
|
@@ -0,0 +1,34 @@
|
|
1
|
+
Feature: W0808
|
2
|
+
|
3
|
+
W0808 detects that it pre-defined macro is re-defined.
|
4
|
+
|
5
|
+
Scenario: pre-defined macro is re-defined
|
6
|
+
Given a target source named "fixture.c" with:
|
7
|
+
"""
|
8
|
+
#define __STDC_VERSION__ "1" /* W0808 */
|
9
|
+
#define __LINE__ "2" /* W0808 */
|
10
|
+
#define __FILE__ "3" /* W0808 */
|
11
|
+
#define __DATE__ "4" /* W0808 */
|
12
|
+
#define __TIME__ "5" /* W0808 */
|
13
|
+
#define __STDC__ "6" /* W0808 */
|
14
|
+
"""
|
15
|
+
When I successfully run `adlint fixture.c` on noarch
|
16
|
+
Then the output should exactly match with:
|
17
|
+
| mesg | line | column |
|
18
|
+
| W0808 | 1 | 9 |
|
19
|
+
| W0808 | 2 | 9 |
|
20
|
+
| W0808 | 3 | 9 |
|
21
|
+
| W0808 | 4 | 9 |
|
22
|
+
| W0808 | 5 | 9 |
|
23
|
+
| W0808 | 6 | 9 |
|
24
|
+
|
25
|
+
Scenario: undefine the macro defined by the user
|
26
|
+
Given a target source named "fixture.c" with:
|
27
|
+
"""
|
28
|
+
#define LINE !LINE
|
29
|
+
"""
|
30
|
+
When I successfully run `adlint fixture.c` on noarch
|
31
|
+
Then the output should exactly match with:
|
32
|
+
| mesg | line | column |
|
33
|
+
|
34
|
+
# vim:ts=2:sw=2:sts=2:et:
|
@@ -0,0 +1,114 @@
|
|
1
|
+
Feature: W0809
|
2
|
+
|
3
|
+
W0809 detects that an identifier is declared but it already reserved by the
|
4
|
+
library.
|
5
|
+
|
6
|
+
Scenario: an identifier starts with `__'
|
7
|
+
Given a target source named "fixture.c" with:
|
8
|
+
"""
|
9
|
+
extern int __number; /* W0809 */
|
10
|
+
extern int __NUMBER; /* W0809 */
|
11
|
+
extern char __value; /* W0809 */
|
12
|
+
extern char __VALUE; /* W0809 */
|
13
|
+
"""
|
14
|
+
When I successfully run `adlint fixture.c` on noarch
|
15
|
+
Then the output should exactly match with:
|
16
|
+
| mesg | line | column |
|
17
|
+
| W0118 | 1 | 12 |
|
18
|
+
| W0118 | 2 | 12 |
|
19
|
+
| W0118 | 3 | 13 |
|
20
|
+
| W0118 | 4 | 13 |
|
21
|
+
| W0809 | 1 | 12 |
|
22
|
+
| W0809 | 2 | 12 |
|
23
|
+
| W0809 | 3 | 13 |
|
24
|
+
| W0809 | 4 | 13 |
|
25
|
+
|
26
|
+
Scenario: an identifier starts with `_(capital letters)'
|
27
|
+
Given a target source named "fixture.c" with:
|
28
|
+
"""
|
29
|
+
extern int _NUMBER; /* W0809 */
|
30
|
+
extern int _Number; /* W0809 */
|
31
|
+
extern char _VALUE; /* W0809 */
|
32
|
+
extern char _Value; /* W0809 */
|
33
|
+
"""
|
34
|
+
When I successfully run `adlint fixture.c` on noarch
|
35
|
+
Then the output should exactly match with:
|
36
|
+
| mesg | line | column |
|
37
|
+
| W0118 | 1 | 12 |
|
38
|
+
| W0118 | 2 | 12 |
|
39
|
+
| W0118 | 3 | 13 |
|
40
|
+
| W0118 | 4 | 13 |
|
41
|
+
| W0809 | 1 | 12 |
|
42
|
+
| W0809 | 2 | 12 |
|
43
|
+
| W0809 | 3 | 13 |
|
44
|
+
| W0809 | 4 | 13 |
|
45
|
+
|
46
|
+
Scenario: an identifier starts with `_' declared as function
|
47
|
+
Given a target source named "fixture.c" with:
|
48
|
+
"""
|
49
|
+
static void _func(void); /* W0809 */
|
50
|
+
"""
|
51
|
+
When I successfully run `adlint fixture.c` on noarch
|
52
|
+
Then the output should exactly match with:
|
53
|
+
| mesg | line | column |
|
54
|
+
| W0809 | 1 | 13 |
|
55
|
+
|
56
|
+
Scenario: an identifier starts with `_' declared as struct
|
57
|
+
Given a target source named "fixture.c" with:
|
58
|
+
"""
|
59
|
+
struct _foo { /* W0809 */
|
60
|
+
int i;
|
61
|
+
};
|
62
|
+
"""
|
63
|
+
When I successfully run `adlint fixture.c` on noarch
|
64
|
+
Then the output should exactly match with:
|
65
|
+
| mesg | line | column |
|
66
|
+
| W0809 | 1 | 8 |
|
67
|
+
|
68
|
+
Scenario: an identifier starts with `_' declared as typedef
|
69
|
+
Given a target source named "fixture.c" with:
|
70
|
+
"""
|
71
|
+
typedef void _type; /* W0809 */
|
72
|
+
"""
|
73
|
+
When I successfully run `adlint fixture.c` on noarch
|
74
|
+
Then the output should exactly match with:
|
75
|
+
| mesg | line | column |
|
76
|
+
| W0809 | 1 | 14 |
|
77
|
+
|
78
|
+
Scenario: an identifier starts with `_' declared as enum
|
79
|
+
Given a target source named "fixture.c" with:
|
80
|
+
"""
|
81
|
+
enum _color { Red, Green, Blue}; /* W0809 */
|
82
|
+
"""
|
83
|
+
When I successfully run `adlint fixture.c` on noarch
|
84
|
+
Then the output should exactly match with:
|
85
|
+
| mesg | line | column |
|
86
|
+
| W0809 | 1 | 6 |
|
87
|
+
|
88
|
+
Scenario: an identifier starts with `_' declared as enumerators
|
89
|
+
Given a target source named "fixture.c" with:
|
90
|
+
"""
|
91
|
+
enum color { _Red, _Green, _Blue}; /* W0809 */
|
92
|
+
"""
|
93
|
+
When I successfully run `adlint fixture.c` on noarch
|
94
|
+
Then the output should exactly match with:
|
95
|
+
| mesg | line | column |
|
96
|
+
| W0809 | 1 | 14 |
|
97
|
+
| W0809 | 1 | 20 |
|
98
|
+
| W0809 | 1 | 28 |
|
99
|
+
|
100
|
+
Scenario: an identifier starts with `_' declared as union
|
101
|
+
Given a target source named "fixture.c" with:
|
102
|
+
"""
|
103
|
+
union _uni { /* W0809 */
|
104
|
+
int a;
|
105
|
+
int b;
|
106
|
+
};
|
107
|
+
"""
|
108
|
+
When I successfully run `adlint fixture.c` on noarch
|
109
|
+
Then the output should exactly match with:
|
110
|
+
| mesg | line | column |
|
111
|
+
| W0551 | 1 | 7 |
|
112
|
+
| W0809 | 1 | 7 |
|
113
|
+
|
114
|
+
# vim:ts=2:sw=2:sts=2:et:
|