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
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Code checkings (cc1-phase) of adlint-exam-c_builtin package.
|
2
2
|
#
|
3
3
|
# Author:: Rie Shima <mailto:rkakuuchi@users.sourceforge.net>
|
4
4
|
# Copyright:: Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
|
@@ -29,13 +29,19 @@
|
|
29
29
|
#
|
30
30
|
#++
|
31
31
|
|
32
|
+
require "adlint/exam"
|
32
33
|
require "adlint/report"
|
33
|
-
require "adlint/
|
34
|
+
require "adlint/c/phase"
|
35
|
+
require "adlint/c/syntax"
|
36
|
+
require "adlint/c/format"
|
34
37
|
|
35
38
|
module AdLint #:nodoc:
|
36
|
-
module
|
39
|
+
module Exam #:nodoc:
|
40
|
+
module CBuiltin #:nodoc:
|
41
|
+
|
42
|
+
class W0573 < PassiveCodeCheck
|
43
|
+
def_registrant_phase C::Prepare2Phase
|
37
44
|
|
38
|
-
class W0573 < PassiveMessageDetection
|
39
45
|
def initialize(context)
|
40
46
|
super
|
41
47
|
interp = context[:c_interpreter]
|
@@ -63,7 +69,7 @@ module C #:nodoc:
|
|
63
69
|
|
64
70
|
def format_str_index_of(function_call_expression)
|
65
71
|
function_call_expression.argument_expressions.index do |arg_expr|
|
66
|
-
arg_expr.kind_of?(StringLiteralSpecifier)
|
72
|
+
arg_expr.kind_of?(C::StringLiteralSpecifier)
|
67
73
|
end
|
68
74
|
end
|
69
75
|
|
@@ -75,14 +81,16 @@ module C #:nodoc:
|
|
75
81
|
if format_str && format_str.literal.value =~ /\AL?"(.*)"\z/i
|
76
82
|
location = format_str.location
|
77
83
|
trailing_args = arg_variables[(format_str_index + 1)..-1] || []
|
78
|
-
return ScanfFormat.new($1, location, trailing_args, environment)
|
84
|
+
return C::ScanfFormat.new($1, location, trailing_args, environment)
|
79
85
|
end
|
80
86
|
end
|
81
87
|
nil
|
82
88
|
end
|
83
89
|
end
|
84
90
|
|
85
|
-
class W0606 <
|
91
|
+
class W0606 < PassiveCodeCheck
|
92
|
+
def_registrant_phase C::Prepare2Phase
|
93
|
+
|
86
94
|
def initialize(context)
|
87
95
|
super
|
88
96
|
visitor = context[:c_visitor]
|
@@ -102,7 +110,9 @@ module C #:nodoc:
|
|
102
110
|
end
|
103
111
|
end
|
104
112
|
|
105
|
-
class W0645 <
|
113
|
+
class W0645 < PassiveCodeCheck
|
114
|
+
def_registrant_phase C::Prepare2Phase
|
115
|
+
|
106
116
|
def initialize(context)
|
107
117
|
super
|
108
118
|
visitor = context[:c_visitor]
|
@@ -117,6 +127,8 @@ module C #:nodoc:
|
|
117
127
|
end
|
118
128
|
|
119
129
|
class W0685 < W0573
|
130
|
+
def_registrant_phase C::Prepare2Phase
|
131
|
+
|
120
132
|
def check(function_call_expression, function, arg_variables,
|
121
133
|
result_variable)
|
122
134
|
if function.named? && function.name =~ /\A.*scanf\z/
|
@@ -137,6 +149,8 @@ module C #:nodoc:
|
|
137
149
|
end
|
138
150
|
|
139
151
|
class W0686 < W0573
|
152
|
+
def_registrant_phase C::Prepare2Phase
|
153
|
+
|
140
154
|
def check(function_call_expression, function, arg_variables,
|
141
155
|
result_variable)
|
142
156
|
if function.named? && function.name =~ /\A.*scanf\z/
|
@@ -156,7 +170,9 @@ module C #:nodoc:
|
|
156
170
|
end
|
157
171
|
end
|
158
172
|
|
159
|
-
class W0697 <
|
173
|
+
class W0697 < PassiveCodeCheck
|
174
|
+
def_registrant_phase C::Prepare2Phase
|
175
|
+
|
160
176
|
def initialize(context)
|
161
177
|
super
|
162
178
|
interp = context[:c_interpreter]
|
@@ -185,7 +201,9 @@ module C #:nodoc:
|
|
185
201
|
end
|
186
202
|
end
|
187
203
|
|
188
|
-
class W0698 <
|
204
|
+
class W0698 < PassiveCodeCheck
|
205
|
+
def_registrant_phase C::Prepare2Phase
|
206
|
+
|
189
207
|
def initialize(context)
|
190
208
|
super
|
191
209
|
visitor = context[:c_visitor]
|
@@ -219,6 +237,8 @@ module C #:nodoc:
|
|
219
237
|
end
|
220
238
|
|
221
239
|
class W0699 < W0698
|
240
|
+
def_registrant_phase C::Prepare2Phase
|
241
|
+
|
222
242
|
private
|
223
243
|
def check(return_statement)
|
224
244
|
return unless @current_function.implicitly_typed?
|
@@ -230,7 +250,9 @@ module C #:nodoc:
|
|
230
250
|
end
|
231
251
|
end
|
232
252
|
|
233
|
-
class W0700 <
|
253
|
+
class W0700 < PassiveCodeCheck
|
254
|
+
def_registrant_phase C::Prepare2Phase
|
255
|
+
|
234
256
|
def initialize(context)
|
235
257
|
super
|
236
258
|
interp = context[:c_interpreter]
|
@@ -269,7 +291,9 @@ module C #:nodoc:
|
|
269
291
|
end
|
270
292
|
end
|
271
293
|
|
272
|
-
class W0711 <
|
294
|
+
class W0711 < PassiveCodeCheck
|
295
|
+
def_registrant_phase C::Prepare2Phase
|
296
|
+
|
273
297
|
def initialize(context)
|
274
298
|
super
|
275
299
|
visitor = context[:c_visitor]
|
@@ -285,6 +309,8 @@ module C #:nodoc:
|
|
285
309
|
end
|
286
310
|
|
287
311
|
class W0712 < W0711
|
312
|
+
def_registrant_phase C::Prepare2Phase
|
313
|
+
|
288
314
|
private
|
289
315
|
def check(expression)
|
290
316
|
if expression.lhs_operand.logical? && !expression.rhs_operand.logical?
|
@@ -294,6 +320,8 @@ module C #:nodoc:
|
|
294
320
|
end
|
295
321
|
|
296
322
|
class W0713 < W0711
|
323
|
+
def_registrant_phase C::Prepare2Phase
|
324
|
+
|
297
325
|
private
|
298
326
|
def check(expression)
|
299
327
|
if expression.lhs_operand.logical? && expression.rhs_operand.logical?
|
@@ -302,7 +330,9 @@ module C #:nodoc:
|
|
302
330
|
end
|
303
331
|
end
|
304
332
|
|
305
|
-
class W0714 <
|
333
|
+
class W0714 < PassiveCodeCheck
|
334
|
+
def_registrant_phase C::Prepare2Phase
|
335
|
+
|
306
336
|
def initialize(context)
|
307
337
|
super
|
308
338
|
visitor = context[:c_visitor]
|
@@ -317,7 +347,9 @@ module C #:nodoc:
|
|
317
347
|
end
|
318
348
|
end
|
319
349
|
|
320
|
-
class W0715 <
|
350
|
+
class W0715 < PassiveCodeCheck
|
351
|
+
def_registrant_phase C::Prepare2Phase
|
352
|
+
|
321
353
|
def initialize(context)
|
322
354
|
super
|
323
355
|
visitor = context[:c_visitor]
|
@@ -332,7 +364,9 @@ module C #:nodoc:
|
|
332
364
|
end
|
333
365
|
end
|
334
366
|
|
335
|
-
class W0716 <
|
367
|
+
class W0716 < PassiveCodeCheck
|
368
|
+
def_registrant_phase C::Prepare2Phase
|
369
|
+
|
336
370
|
def initialize(context)
|
337
371
|
super
|
338
372
|
visitor = context[:c_visitor]
|
@@ -359,6 +393,8 @@ module C #:nodoc:
|
|
359
393
|
end
|
360
394
|
|
361
395
|
class W0717 < W0716
|
396
|
+
def_registrant_phase C::Prepare2Phase
|
397
|
+
|
362
398
|
private
|
363
399
|
def check(expression)
|
364
400
|
if expression.lhs_operand.logical? && !expression.rhs_operand.logical?
|
@@ -368,6 +404,8 @@ module C #:nodoc:
|
|
368
404
|
end
|
369
405
|
|
370
406
|
class W0718 < W0716
|
407
|
+
def_registrant_phase C::Prepare2Phase
|
408
|
+
|
371
409
|
private
|
372
410
|
def check(expression)
|
373
411
|
if !expression.lhs_operand.logical? && expression.rhs_operand.logical?
|
@@ -377,6 +415,8 @@ module C #:nodoc:
|
|
377
415
|
end
|
378
416
|
|
379
417
|
class W0726 < W0698
|
418
|
+
def_registrant_phase C::Prepare2Phase
|
419
|
+
|
380
420
|
private
|
381
421
|
def check(return_statement)
|
382
422
|
return unless return_statement.expression
|
@@ -390,7 +430,9 @@ module C #:nodoc:
|
|
390
430
|
end
|
391
431
|
end
|
392
432
|
|
393
|
-
class W0732 <
|
433
|
+
class W0732 < PassiveCodeCheck
|
434
|
+
def_registrant_phase C::Prepare2Phase
|
435
|
+
|
394
436
|
def initialize(context)
|
395
437
|
super
|
396
438
|
visitor = context[:c_visitor]
|
@@ -407,7 +449,9 @@ module C #:nodoc:
|
|
407
449
|
end
|
408
450
|
end
|
409
451
|
|
410
|
-
class W0733 <
|
452
|
+
class W0733 < PassiveCodeCheck
|
453
|
+
def_registrant_phase C::Prepare2Phase
|
454
|
+
|
411
455
|
def initialize(context)
|
412
456
|
super
|
413
457
|
visitor = context[:c_visitor]
|
@@ -424,7 +468,9 @@ module C #:nodoc:
|
|
424
468
|
end
|
425
469
|
end
|
426
470
|
|
427
|
-
class W0734 <
|
471
|
+
class W0734 < PassiveCodeCheck
|
472
|
+
def_registrant_phase C::Prepare2Phase
|
473
|
+
|
428
474
|
def initialize(context)
|
429
475
|
super
|
430
476
|
visitor = context[:c_visitor]
|
@@ -443,6 +489,8 @@ module C #:nodoc:
|
|
443
489
|
end
|
444
490
|
|
445
491
|
class W0735 < W0734
|
492
|
+
def_registrant_phase C::Prepare2Phase
|
493
|
+
|
446
494
|
private
|
447
495
|
def check(expr)
|
448
496
|
if expr.rhs_operand.arithmetic? || expr.rhs_operand.bitwise?
|
@@ -453,7 +501,9 @@ module C #:nodoc:
|
|
453
501
|
end
|
454
502
|
end
|
455
503
|
|
456
|
-
class W0781 <
|
504
|
+
class W0781 < PassiveCodeCheck
|
505
|
+
def_registrant_phase C::Prepare2Phase
|
506
|
+
|
457
507
|
def initialize(context)
|
458
508
|
super
|
459
509
|
visitor = context[:c_visitor]
|
@@ -481,7 +531,9 @@ module C #:nodoc:
|
|
481
531
|
end
|
482
532
|
end
|
483
533
|
|
484
|
-
class W0801 <
|
534
|
+
class W0801 < PassiveCodeCheck
|
535
|
+
def_registrant_phase C::Prepare2Phase
|
536
|
+
|
485
537
|
def initialize(context)
|
486
538
|
super
|
487
539
|
visitor = context[:c_visitor]
|
@@ -495,7 +547,9 @@ module C #:nodoc:
|
|
495
547
|
end
|
496
548
|
end
|
497
549
|
|
498
|
-
class W0809 <
|
550
|
+
class W0809 < PassiveCodeCheck
|
551
|
+
def_registrant_phase C::Prepare2Phase
|
552
|
+
|
499
553
|
def initialize(context)
|
500
554
|
super
|
501
555
|
visitor = context[:c_visitor]
|
@@ -582,7 +636,9 @@ module C #:nodoc:
|
|
582
636
|
end
|
583
637
|
end
|
584
638
|
|
585
|
-
class W1030 <
|
639
|
+
class W1030 < PassiveCodeCheck
|
640
|
+
def_registrant_phase C::Prepare2Phase
|
641
|
+
|
586
642
|
def initialize(context)
|
587
643
|
super
|
588
644
|
visitor = context[:c_visitor]
|
@@ -615,7 +671,9 @@ module C #:nodoc:
|
|
615
671
|
end
|
616
672
|
end
|
617
673
|
|
618
|
-
class W1033 <
|
674
|
+
class W1033 < PassiveCodeCheck
|
675
|
+
def_registrant_phase C::Prepare2Phase
|
676
|
+
|
619
677
|
def initialize(context)
|
620
678
|
super
|
621
679
|
visitor = context[:c_visitor]
|
@@ -634,7 +692,9 @@ module C #:nodoc:
|
|
634
692
|
end
|
635
693
|
end
|
636
694
|
|
637
|
-
class W1066 <
|
695
|
+
class W1066 < PassiveCodeCheck
|
696
|
+
def_registrant_phase C::Prepare2Phase
|
697
|
+
|
638
698
|
def initialize(context)
|
639
699
|
super
|
640
700
|
@interp = context[:c_interpreter]
|
@@ -651,7 +711,7 @@ module C #:nodoc:
|
|
651
711
|
return unless original_variable.type.floating?
|
652
712
|
|
653
713
|
case expression = @rvalues[original_variable]
|
654
|
-
when AdditiveExpression, MultiplicativeExpression
|
714
|
+
when C::AdditiveExpression, C::MultiplicativeExpression
|
655
715
|
if original_variable.type.same_as?(from_type) &&
|
656
716
|
result_variable.type.same_as?(to_type)
|
657
717
|
W(message_id, expression.location)
|
@@ -692,6 +752,8 @@ module C #:nodoc:
|
|
692
752
|
end
|
693
753
|
|
694
754
|
class W1067 < W1066
|
755
|
+
def_registrant_phase C::Prepare2Phase
|
756
|
+
|
695
757
|
private
|
696
758
|
def from_type
|
697
759
|
@interp.float_type
|
@@ -703,6 +765,8 @@ module C #:nodoc:
|
|
703
765
|
end
|
704
766
|
|
705
767
|
class W1068 < W1066
|
768
|
+
def_registrant_phase C::Prepare2Phase
|
769
|
+
|
706
770
|
private
|
707
771
|
def from_type
|
708
772
|
@interp.double_type
|
@@ -713,7 +777,9 @@ module C #:nodoc:
|
|
713
777
|
end
|
714
778
|
end
|
715
779
|
|
716
|
-
class W1069 <
|
780
|
+
class W1069 < PassiveCodeCheck
|
781
|
+
def_registrant_phase C::Prepare2Phase
|
782
|
+
|
717
783
|
def initialize(context)
|
718
784
|
super
|
719
785
|
visitor = context[:c_visitor]
|
@@ -737,7 +803,7 @@ module C #:nodoc:
|
|
737
803
|
|
738
804
|
def enter_if_else_statement(node)
|
739
805
|
@if_else_statement_chain.push(node)
|
740
|
-
if node.else_statement.kind_of?(IfStatement)
|
806
|
+
if node.else_statement.kind_of?(C::IfStatement)
|
741
807
|
W(:W1069, @if_else_statement_chain.first.location)
|
742
808
|
end
|
743
809
|
end
|
@@ -748,6 +814,8 @@ module C #:nodoc:
|
|
748
814
|
end
|
749
815
|
|
750
816
|
class W1070 < W0781
|
817
|
+
def_registrant_phase C::Prepare2Phase
|
818
|
+
|
751
819
|
private
|
752
820
|
def check(node)
|
753
821
|
if exec_path_num = @exec_path_nums.last and exec_path_num == 2
|
@@ -761,7 +829,9 @@ module C #:nodoc:
|
|
761
829
|
end
|
762
830
|
end
|
763
831
|
|
764
|
-
class W1072 <
|
832
|
+
class W1072 < PassiveCodeCheck
|
833
|
+
def_registrant_phase C::Prepare2Phase
|
834
|
+
|
765
835
|
def initialize(context)
|
766
836
|
super
|
767
837
|
visitor = context[:c_visitor]
|
@@ -776,3 +846,4 @@ module C #:nodoc:
|
|
776
846
|
|
777
847
|
end
|
778
848
|
end
|
849
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Code structure
|
1
|
+
# Code structure extractions (cc1-phase) of adlint-exam-c_builtin package.
|
2
2
|
#
|
3
3
|
# Author:: Yutaka Yanoh <mailto:yanoh@users.sourceforge.net>
|
4
4
|
# Copyright:: Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
|
@@ -29,13 +29,18 @@
|
|
29
29
|
#
|
30
30
|
#++
|
31
31
|
|
32
|
+
require "adlint/exam"
|
32
33
|
require "adlint/report"
|
33
|
-
require "adlint/
|
34
|
+
require "adlint/c/phase"
|
35
|
+
require "adlint/c/syntax"
|
34
36
|
|
35
37
|
module AdLint #:nodoc:
|
36
|
-
module
|
38
|
+
module Exam #:nodoc:
|
39
|
+
module CBuiltin #:nodoc:
|
37
40
|
|
38
41
|
class TypeDeclExtraction < CodeExtraction
|
42
|
+
def_registrant_phase C::Prepare2Phase
|
43
|
+
|
39
44
|
def initialize(context)
|
40
45
|
super
|
41
46
|
visitor = context[:c_visitor]
|
@@ -74,6 +79,8 @@ module C #:nodoc:
|
|
74
79
|
end
|
75
80
|
|
76
81
|
class GVarDeclExtraction < CodeExtraction
|
82
|
+
def_registrant_phase C::Prepare2Phase
|
83
|
+
|
77
84
|
def initialize(context)
|
78
85
|
super
|
79
86
|
interp = context[:c_interpreter]
|
@@ -94,6 +101,8 @@ module C #:nodoc:
|
|
94
101
|
end
|
95
102
|
|
96
103
|
class FuncDeclExtraction < CodeExtraction
|
104
|
+
def_registrant_phase C::Prepare2Phase
|
105
|
+
|
97
106
|
def initialize(context)
|
98
107
|
super
|
99
108
|
interp = context[:c_interpreter]
|
@@ -131,6 +140,8 @@ module C #:nodoc:
|
|
131
140
|
end
|
132
141
|
|
133
142
|
class VarDefExtraction < CodeExtraction
|
143
|
+
def_registrant_phase C::Prepare2Phase
|
144
|
+
|
134
145
|
def initialize(context)
|
135
146
|
super
|
136
147
|
interp = context[:c_interpreter]
|
@@ -210,6 +221,8 @@ module C #:nodoc:
|
|
210
221
|
end
|
211
222
|
|
212
223
|
class FuncDefExtraction < CodeExtraction
|
224
|
+
def_registrant_phase C::Prepare2Phase
|
225
|
+
|
213
226
|
def initialize(context)
|
214
227
|
super
|
215
228
|
interp = context[:c_interpreter]
|
@@ -237,6 +250,8 @@ module C #:nodoc:
|
|
237
250
|
end
|
238
251
|
|
239
252
|
class LabelDefExtraction < CodeExtraction
|
253
|
+
def_registrant_phase C::Prepare2Phase
|
254
|
+
|
240
255
|
def initialize(context)
|
241
256
|
super
|
242
257
|
visitor = context[:c_visitor]
|
@@ -254,6 +269,8 @@ module C #:nodoc:
|
|
254
269
|
end
|
255
270
|
|
256
271
|
class InitializationExtraction < CodeExtraction
|
272
|
+
def_registrant_phase C::Prepare2Phase
|
273
|
+
|
257
274
|
def initialize(context)
|
258
275
|
super
|
259
276
|
visitor = context[:c_visitor]
|
@@ -274,6 +291,8 @@ module C #:nodoc:
|
|
274
291
|
end
|
275
292
|
|
276
293
|
class AssignmentExtraction < CodeExtraction
|
294
|
+
def_registrant_phase C::Prepare2Phase
|
295
|
+
|
277
296
|
def initialize(context)
|
278
297
|
super
|
279
298
|
visitor = context[:c_visitor]
|
@@ -297,6 +316,8 @@ module C #:nodoc:
|
|
297
316
|
end
|
298
317
|
|
299
318
|
class FuncCallExtraction < CodeExtraction
|
319
|
+
def_registrant_phase C::Prepare2Phase
|
320
|
+
|
300
321
|
def initialize(context)
|
301
322
|
super
|
302
323
|
@interp = context[:c_interpreter]
|
@@ -324,6 +345,8 @@ module C #:nodoc:
|
|
324
345
|
end
|
325
346
|
|
326
347
|
class CrossRefExtraction < CodeExtraction
|
348
|
+
def_registrant_phase C::Prepare2Phase
|
349
|
+
|
327
350
|
def initialize(context)
|
328
351
|
super
|
329
352
|
interp = context[:c_interpreter]
|
@@ -377,6 +400,8 @@ module C #:nodoc:
|
|
377
400
|
end
|
378
401
|
|
379
402
|
class LiteralExtraction < CodeExtraction
|
403
|
+
def_registrant_phase C::Prepare2Phase
|
404
|
+
|
380
405
|
def initialize(context)
|
381
406
|
super
|
382
407
|
visitor = context[:c_visitor]
|
@@ -402,7 +427,7 @@ module C #:nodoc:
|
|
402
427
|
|
403
428
|
def type_of(node)
|
404
429
|
case node
|
405
|
-
when ConstantSpecifier
|
430
|
+
when C::ConstantSpecifier
|
406
431
|
case node.constant.value
|
407
432
|
when /\A0x[0-9a-f]+[UL]*\z/i
|
408
433
|
"HN"
|
@@ -422,7 +447,7 @@ module C #:nodoc:
|
|
422
447
|
else
|
423
448
|
"NA"
|
424
449
|
end
|
425
|
-
when StringLiteralSpecifier
|
450
|
+
when C::StringLiteralSpecifier
|
426
451
|
case node.literal.value
|
427
452
|
when /\A".*"\z/i
|
428
453
|
"SN"
|
@@ -439,3 +464,4 @@ module C #:nodoc:
|
|
439
464
|
|
440
465
|
end
|
441
466
|
end
|
467
|
+
end
|