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
@@ -4,14 +4,14 @@ Feature: W0717
|
|
4
4
|
expression is `effectively boolean'.
|
5
5
|
|
6
6
|
Scenario: an arithmetic expression
|
7
|
-
Given a target source named "
|
7
|
+
Given a target source named "fixture.c" with:
|
8
8
|
"""
|
9
9
|
static int func(int a, int b, int c)
|
10
10
|
{
|
11
11
|
return (a > b) + c; /* W0717 */
|
12
12
|
}
|
13
13
|
"""
|
14
|
-
When I successfully run `adlint
|
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
17
|
| W1076 | 1 | 12 |
|
@@ -24,14 +24,14 @@ Feature: W0717
|
|
24
24
|
| W0628 | 1 | 12 |
|
25
25
|
|
26
26
|
Scenario: a bitwise expression
|
27
|
-
Given a target source named "
|
27
|
+
Given a target source named "fixture.c" with:
|
28
28
|
"""
|
29
29
|
static int func(int a, int b, int c)
|
30
30
|
{
|
31
31
|
return (a > b) ^ c; /* W0717 */
|
32
32
|
}
|
33
33
|
"""
|
34
|
-
When I successfully run `adlint
|
34
|
+
When I successfully run `adlint fixture.c` on noarch
|
35
35
|
Then the output should exactly match with:
|
36
36
|
| mesg | line | column |
|
37
37
|
| W1076 | 1 | 12 |
|
@@ -44,14 +44,14 @@ Feature: W0717
|
|
44
44
|
| W0628 | 1 | 12 |
|
45
45
|
|
46
46
|
Scenario: a shift expression
|
47
|
-
Given a target source named "
|
47
|
+
Given a target source named "fixture.c" with:
|
48
48
|
"""
|
49
49
|
static int func(int a, int b, int c)
|
50
50
|
{
|
51
51
|
return (a > b) << c; /* W0717 */
|
52
52
|
}
|
53
53
|
"""
|
54
|
-
When I successfully run `adlint
|
54
|
+
When I successfully run `adlint fixture.c` on noarch
|
55
55
|
Then the output should exactly match with:
|
56
56
|
| mesg | line | column |
|
57
57
|
| W1076 | 1 | 12 |
|
@@ -4,14 +4,14 @@ Feature: W0718
|
|
4
4
|
expression is `effectively boolean'.
|
5
5
|
|
6
6
|
Scenario: an arithmetic expression
|
7
|
-
Given a target source named "
|
7
|
+
Given a target source named "fixture.c" with:
|
8
8
|
"""
|
9
9
|
static int func(int a, int b, int c)
|
10
10
|
{
|
11
11
|
return a + (b > c); /* W0718 */
|
12
12
|
}
|
13
13
|
"""
|
14
|
-
When I successfully run `adlint
|
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
17
|
| W1076 | 1 | 12 |
|
@@ -24,14 +24,14 @@ Feature: W0718
|
|
24
24
|
| W0628 | 1 | 12 |
|
25
25
|
|
26
26
|
Scenario: a bitwise expression
|
27
|
-
Given a target source named "
|
27
|
+
Given a target source named "fixture.c" with:
|
28
28
|
"""
|
29
29
|
static int func(int a, int b, int c)
|
30
30
|
{
|
31
31
|
return a ^ (b > c); /* W0718 */
|
32
32
|
}
|
33
33
|
"""
|
34
|
-
When I successfully run `adlint
|
34
|
+
When I successfully run `adlint fixture.c` on noarch
|
35
35
|
Then the output should exactly match with:
|
36
36
|
| mesg | line | column |
|
37
37
|
| W1076 | 1 | 12 |
|
@@ -44,14 +44,14 @@ Feature: W0718
|
|
44
44
|
| W0628 | 1 | 12 |
|
45
45
|
|
46
46
|
Scenario: a shift expression
|
47
|
-
Given a target source named "
|
47
|
+
Given a target source named "fixture.c" with:
|
48
48
|
"""
|
49
49
|
static int func(int a, int b, int c)
|
50
50
|
{
|
51
51
|
return a << (b > c); /* W0718 */
|
52
52
|
}
|
53
53
|
"""
|
54
|
-
When I successfully run `adlint
|
54
|
+
When I successfully run `adlint fixture.c` on noarch
|
55
55
|
Then the output should exactly match with:
|
56
56
|
| mesg | line | column |
|
57
57
|
| W1076 | 1 | 12 |
|
@@ -4,14 +4,14 @@ Feature: W0719
|
|
4
4
|
than the bit length of underlying type of the left hand side.
|
5
5
|
|
6
6
|
Scenario: 31-bit left shift-expression of `char' value
|
7
|
-
Given a target source named "
|
7
|
+
Given a target source named "fixture.c" with:
|
8
8
|
"""
|
9
9
|
int foo(char c)
|
10
10
|
{
|
11
11
|
return c << 31; /* W0719 */
|
12
12
|
}
|
13
13
|
"""
|
14
|
-
When I successfully run `adlint
|
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
17
|
| W0117 | 1 | 5 |
|
@@ -23,14 +23,14 @@ Feature: W0719
|
|
23
23
|
| W0628 | 1 | 5 |
|
24
24
|
|
25
25
|
Scenario: 31-bit right shift-expression of `char' value
|
26
|
-
Given a target source named "
|
26
|
+
Given a target source named "fixture.c" with:
|
27
27
|
"""
|
28
28
|
int foo(char c)
|
29
29
|
{
|
30
30
|
return c >> 31; /* W0719 */
|
31
31
|
}
|
32
32
|
"""
|
33
|
-
When I successfully run `adlint
|
33
|
+
When I successfully run `adlint fixture.c` on noarch
|
34
34
|
Then the output should exactly match with:
|
35
35
|
| mesg | line | column |
|
36
36
|
| W0117 | 1 | 5 |
|
@@ -41,14 +41,14 @@ Feature: W0719
|
|
41
41
|
| W0628 | 1 | 5 |
|
42
42
|
|
43
43
|
Scenario: 7-bit left shift-expression of `char' value
|
44
|
-
Given a target source named "
|
44
|
+
Given a target source named "fixture.c" with:
|
45
45
|
"""
|
46
46
|
int foo(char c)
|
47
47
|
{
|
48
48
|
return c << 7; /* OK */
|
49
49
|
}
|
50
50
|
"""
|
51
|
-
When I successfully run `adlint
|
51
|
+
When I successfully run `adlint fixture.c` on noarch
|
52
52
|
Then the output should exactly match with:
|
53
53
|
| mesg | line | column |
|
54
54
|
| W0117 | 1 | 5 |
|
@@ -59,14 +59,14 @@ Feature: W0719
|
|
59
59
|
| W0628 | 1 | 5 |
|
60
60
|
|
61
61
|
Scenario: 7-bit right shift-expression of `char' value
|
62
|
-
Given a target source named "
|
62
|
+
Given a target source named "fixture.c" with:
|
63
63
|
"""
|
64
64
|
int foo(char c)
|
65
65
|
{
|
66
66
|
return c >> 7; /* OK */
|
67
67
|
}
|
68
68
|
"""
|
69
|
-
When I successfully run `adlint
|
69
|
+
When I successfully run `adlint fixture.c` on noarch
|
70
70
|
Then the output should exactly match with:
|
71
71
|
| mesg | line | column |
|
72
72
|
| W0117 | 1 | 5 |
|
@@ -76,14 +76,14 @@ Feature: W0719
|
|
76
76
|
| W0628 | 1 | 5 |
|
77
77
|
|
78
78
|
Scenario: 31-bit left shift compound-assignment-expression of `char' value
|
79
|
-
Given a target source named "
|
79
|
+
Given a target source named "fixture.c" with:
|
80
80
|
"""
|
81
81
|
void foo(char c)
|
82
82
|
{
|
83
83
|
c <<= 31; /* W0719 */
|
84
84
|
}
|
85
85
|
"""
|
86
|
-
When I successfully run `adlint
|
86
|
+
When I successfully run `adlint fixture.c` on noarch
|
87
87
|
Then the output should exactly match with:
|
88
88
|
| mesg | line | column |
|
89
89
|
| W0117 | 1 | 6 |
|
@@ -96,14 +96,14 @@ Feature: W0719
|
|
96
96
|
| W0628 | 1 | 6 |
|
97
97
|
|
98
98
|
Scenario: 31-bit right shift-expression of `char' value
|
99
|
-
Given a target source named "
|
99
|
+
Given a target source named "fixture.c" with:
|
100
100
|
"""
|
101
101
|
int foo(char c)
|
102
102
|
{
|
103
103
|
return c >> 31; /* W0719 */
|
104
104
|
}
|
105
105
|
"""
|
106
|
-
When I successfully run `adlint
|
106
|
+
When I successfully run `adlint fixture.c` on noarch
|
107
107
|
Then the output should exactly match with:
|
108
108
|
| mesg | line | column |
|
109
109
|
| W0117 | 1 | 5 |
|
@@ -114,14 +114,14 @@ Feature: W0719
|
|
114
114
|
| W0628 | 1 | 5 |
|
115
115
|
|
116
116
|
Scenario: 63-bit left shift compound-assignment-expression of `char' value
|
117
|
-
Given a target source named "
|
117
|
+
Given a target source named "fixture.c" with:
|
118
118
|
"""
|
119
119
|
void foo(char c)
|
120
120
|
{
|
121
121
|
c <<= 63; /* OK but W0650 */
|
122
122
|
}
|
123
123
|
"""
|
124
|
-
When I successfully run `adlint
|
124
|
+
When I successfully run `adlint fixture.c` on noarch
|
125
125
|
Then the output should exactly match with:
|
126
126
|
| mesg | line | column |
|
127
127
|
| W0117 | 1 | 6 |
|
@@ -134,14 +134,14 @@ Feature: W0719
|
|
134
134
|
| W0628 | 1 | 6 |
|
135
135
|
|
136
136
|
Scenario: 63-bit right shift-expression of `char' value
|
137
|
-
Given a target source named "
|
137
|
+
Given a target source named "fixture.c" with:
|
138
138
|
"""
|
139
139
|
int foo(char c)
|
140
140
|
{
|
141
141
|
return c >> 63; /* OK but W0650 */
|
142
142
|
}
|
143
143
|
"""
|
144
|
-
When I successfully run `adlint
|
144
|
+
When I successfully run `adlint fixture.c` on noarch
|
145
145
|
Then the output should exactly match with:
|
146
146
|
| mesg | line | column |
|
147
147
|
| W0117 | 1 | 5 |
|
@@ -3,12 +3,12 @@ Feature: W0723
|
|
3
3
|
W0723 detects that an arithmetic operation of signed values may be overflow.
|
4
4
|
|
5
5
|
Scenario: an arithmetic operation in initializer of a global variable
|
6
|
-
Given a target source named "
|
6
|
+
Given a target source named "fixture.c" with:
|
7
7
|
"""
|
8
8
|
static int i = 5;
|
9
9
|
static unsigned int j = (unsigned int) &i + 1; /* OK */
|
10
10
|
"""
|
11
|
-
When I successfully run `adlint
|
11
|
+
When I successfully run `adlint fixture.c` on noarch
|
12
12
|
Then the output should exactly match with:
|
13
13
|
| mesg | line | column |
|
14
14
|
| W0567 | 2 | 25 |
|
@@ -16,14 +16,14 @@ Feature: W0723
|
|
16
16
|
| W9003 | 2 | 45 |
|
17
17
|
|
18
18
|
Scenario: multiplication of two arbitrary `signed short' values
|
19
|
-
Given a target source named "
|
19
|
+
Given a target source named "fixture.c" with:
|
20
20
|
"""
|
21
21
|
static int foo(short a, short b)
|
22
22
|
{
|
23
23
|
return a * b; /* W0723 should not be output */
|
24
24
|
}
|
25
25
|
"""
|
26
|
-
When I successfully run `adlint
|
26
|
+
When I successfully run `adlint fixture.c` on noarch
|
27
27
|
Then the output should exactly match with:
|
28
28
|
| mesg | line | column |
|
29
29
|
| W1076 | 1 | 12 |
|
@@ -33,14 +33,14 @@ Feature: W0723
|
|
33
33
|
| W0628 | 1 | 12 |
|
34
34
|
|
35
35
|
Scenario: multiplication of two arbitrary `signed int' values
|
36
|
-
Given a target source named "
|
36
|
+
Given a target source named "fixture.c" with:
|
37
37
|
"""
|
38
38
|
static int foo(int a, int b)
|
39
39
|
{
|
40
40
|
return a * b; /* W0723 */
|
41
41
|
}
|
42
42
|
"""
|
43
|
-
When I successfully run `adlint
|
43
|
+
When I successfully run `adlint fixture.c` on noarch
|
44
44
|
Then the output should exactly match with:
|
45
45
|
| mesg | line | column |
|
46
46
|
| W1076 | 1 | 12 |
|
@@ -0,0 +1,95 @@
|
|
1
|
+
Feature: W0726
|
2
|
+
|
3
|
+
W0726 detects that `return' statement is found in qualified void function.
|
4
|
+
|
5
|
+
Scenario: `return' with value statement in const void function
|
6
|
+
Given a target source named "fixture.c" with:
|
7
|
+
"""
|
8
|
+
const void func(void) /* W0726 */
|
9
|
+
{
|
10
|
+
return 0;
|
11
|
+
}
|
12
|
+
"""
|
13
|
+
When I successfully run `adlint fixture.c` on noarch
|
14
|
+
Then the output should exactly match with:
|
15
|
+
| mesg | line | column |
|
16
|
+
| W0117 | 1 | 12 |
|
17
|
+
| W1033 | 1 | 12 |
|
18
|
+
| W0726 | 3 | 5 |
|
19
|
+
| W0628 | 1 | 12 |
|
20
|
+
|
21
|
+
Scenario: `return' with value statement in volatile void function
|
22
|
+
Given a target source named "fixture.c" with:
|
23
|
+
"""
|
24
|
+
volatile void func(void) /* W0726 */
|
25
|
+
{
|
26
|
+
return 0;
|
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 | 15 |
|
33
|
+
| W1033 | 1 | 15 |
|
34
|
+
| W0726 | 3 | 5 |
|
35
|
+
| W0628 | 1 | 15 |
|
36
|
+
|
37
|
+
Scenario: `return;' statement in const void function
|
38
|
+
Given a target source named "fixture.c" with:
|
39
|
+
"""
|
40
|
+
const void func(void) /* OK */
|
41
|
+
{
|
42
|
+
return;
|
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
|
+
| W1033 | 1 | 12 |
|
50
|
+
| W0628 | 1 | 12 |
|
51
|
+
|
52
|
+
Scenario: `return;' statement in volatile void function
|
53
|
+
Given a target source named "fixture.c" with:
|
54
|
+
"""
|
55
|
+
volatile void func(void) /* OK */
|
56
|
+
{
|
57
|
+
return;
|
58
|
+
}
|
59
|
+
"""
|
60
|
+
When I successfully run `adlint fixture.c` on noarch
|
61
|
+
Then the output should exactly match with:
|
62
|
+
| mesg | line | column |
|
63
|
+
| W0117 | 1 | 15 |
|
64
|
+
| W1033 | 1 | 15 |
|
65
|
+
| W0628 | 1 | 15 |
|
66
|
+
|
67
|
+
Scenario: `return' with value statement in void function
|
68
|
+
Given a target source named "fixture.c" with:
|
69
|
+
"""
|
70
|
+
void func(void) /* OK */
|
71
|
+
{
|
72
|
+
return 0;
|
73
|
+
}
|
74
|
+
"""
|
75
|
+
When I successfully run `adlint fixture.c` on noarch
|
76
|
+
Then the output should exactly match with:
|
77
|
+
| mesg | line | column |
|
78
|
+
| W0117 | 1 | 6 |
|
79
|
+
| W0628 | 1 | 6 |
|
80
|
+
|
81
|
+
Scenario: `return' statement in void function
|
82
|
+
Given a target source named "fixture.c" with:
|
83
|
+
"""
|
84
|
+
void func(void) /* OK */
|
85
|
+
{
|
86
|
+
return 0;
|
87
|
+
}
|
88
|
+
"""
|
89
|
+
When I successfully run `adlint fixture.c` on noarch
|
90
|
+
Then the output should exactly match with:
|
91
|
+
| mesg | line | column |
|
92
|
+
| W0117 | 1 | 6 |
|
93
|
+
| W0628 | 1 | 6 |
|
94
|
+
|
95
|
+
# vim:ts=2:sw=2:sts=2:et:
|
@@ -4,7 +4,7 @@ Feature: W0732
|
|
4
4
|
arithmetic expression.
|
5
5
|
|
6
6
|
Scenario: both sides of `&&' operator are arithmetic expressions
|
7
|
-
Given a target source named "
|
7
|
+
Given a target source named "fixture.c" with:
|
8
8
|
"""
|
9
9
|
static void func(int a, int b, int c, int d)
|
10
10
|
{
|
@@ -20,7 +20,7 @@ Feature: W0732
|
|
20
20
|
r = (a *= b) && (c /= d); /* W0732 */
|
21
21
|
}
|
22
22
|
"""
|
23
|
-
When I successfully run `adlint
|
23
|
+
When I successfully run `adlint fixture.c` on noarch
|
24
24
|
Then the output should exactly match with:
|
25
25
|
| mesg | line | column |
|
26
26
|
| W1076 | 1 | 13 |
|
@@ -60,7 +60,7 @@ Feature: W0732
|
|
60
60
|
| W0628 | 1 | 13 |
|
61
61
|
|
62
62
|
Scenario: both sides of `&&' operator are bitwise expressions
|
63
|
-
Given a target source named "
|
63
|
+
Given a target source named "fixture.c" with:
|
64
64
|
"""
|
65
65
|
static void func(int a, int b, int c, int d)
|
66
66
|
{
|
@@ -76,7 +76,7 @@ Feature: W0732
|
|
76
76
|
r = (a <<= b) && (c >>= d); /* W0732 */
|
77
77
|
}
|
78
78
|
"""
|
79
|
-
When I successfully run `adlint
|
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
82
|
| W1076 | 1 | 13 |
|
@@ -127,7 +127,7 @@ Feature: W0732
|
|
127
127
|
| W0628 | 1 | 13 |
|
128
128
|
|
129
129
|
Scenario: both sides of `&&' operator are neither arithmetic nor bitwise
|
130
|
-
Given a target source named "
|
130
|
+
Given a target source named "fixture.c" with:
|
131
131
|
"""
|
132
132
|
static void func(int a, int b, int c, int d)
|
133
133
|
{
|
@@ -145,7 +145,7 @@ Feature: W0732
|
|
145
145
|
r = (a || b) && (c || d); /* OK */
|
146
146
|
}
|
147
147
|
"""
|
148
|
-
When I successfully run `adlint
|
148
|
+
When I successfully run `adlint fixture.c` on noarch
|
149
149
|
Then the output should exactly match with:
|
150
150
|
| mesg | line | column |
|
151
151
|
| W1076 | 1 | 13 |
|
@@ -4,7 +4,7 @@ Feature: W0733
|
|
4
4
|
arithmetic expression.
|
5
5
|
|
6
6
|
Scenario: both sides of `||' operator are arithmetic expressions
|
7
|
-
Given a target source named "
|
7
|
+
Given a target source named "fixture.c" with:
|
8
8
|
"""
|
9
9
|
static void func(int a, int b, int c, int d)
|
10
10
|
{
|
@@ -20,7 +20,7 @@ Feature: W0733
|
|
20
20
|
r = (a *= b) || (c /= d); /* W0733 */
|
21
21
|
}
|
22
22
|
"""
|
23
|
-
When I successfully run `adlint
|
23
|
+
When I successfully run `adlint fixture.c` on noarch
|
24
24
|
Then the output should exactly match with:
|
25
25
|
| mesg | line | column |
|
26
26
|
| W1076 | 1 | 13 |
|
@@ -60,7 +60,7 @@ Feature: W0733
|
|
60
60
|
| W0628 | 1 | 13 |
|
61
61
|
|
62
62
|
Scenario: both sides of `&&' operator are bitwise expressions
|
63
|
-
Given a target source named "
|
63
|
+
Given a target source named "fixture.c" with:
|
64
64
|
"""
|
65
65
|
static void func(int a, int b, int c, int d)
|
66
66
|
{
|
@@ -76,7 +76,7 @@ Feature: W0733
|
|
76
76
|
r = (a <<= b) || (c >>= d); /* W0733 */
|
77
77
|
}
|
78
78
|
"""
|
79
|
-
When I successfully run `adlint
|
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
82
|
| W1076 | 1 | 13 |
|
@@ -127,7 +127,7 @@ Feature: W0733
|
|
127
127
|
| W0628 | 1 | 13 |
|
128
128
|
|
129
129
|
Scenario: both sides of `||' operator are neither arithmetic nor bitwise
|
130
|
-
Given a target source named "
|
130
|
+
Given a target source named "fixture.c" with:
|
131
131
|
"""
|
132
132
|
static void func(int a, int b, int c, int d)
|
133
133
|
{
|
@@ -145,7 +145,7 @@ Feature: W0733
|
|
145
145
|
r = (a || b) || (c || d); /* OK */
|
146
146
|
}
|
147
147
|
"""
|
148
|
-
When I successfully run `adlint
|
148
|
+
When I successfully run `adlint fixture.c` on noarch
|
149
149
|
Then the output should exactly match with:
|
150
150
|
| mesg | line | column |
|
151
151
|
| W1076 | 1 | 13 |
|