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
data/MANIFEST
CHANGED
@@ -26,96 +26,279 @@ etc/conf.d/noarch/GNUmakefile.erb
|
|
26
26
|
etc/conf.d/noarch/adlint_all_bat.erb
|
27
27
|
etc/conf.d/noarch/adlint_all_sh.erb
|
28
28
|
etc/conf.d/noarch/pinit.erb
|
29
|
-
etc/mesg.d/en_US/messages.yml
|
30
|
-
etc/mesg.d/ja_JP/messages.yml
|
31
|
-
|
32
|
-
|
33
|
-
features/
|
34
|
-
features/
|
35
|
-
features/
|
36
|
-
features/
|
37
|
-
features/
|
38
|
-
features/
|
39
|
-
features/
|
40
|
-
features/
|
41
|
-
features/
|
42
|
-
features/
|
43
|
-
features/
|
44
|
-
features/
|
45
|
-
features/
|
46
|
-
features/
|
47
|
-
features/
|
48
|
-
features/
|
49
|
-
features/
|
50
|
-
features/
|
51
|
-
features/
|
52
|
-
features/
|
53
|
-
features/
|
54
|
-
features/
|
55
|
-
features/
|
56
|
-
features/
|
57
|
-
features/
|
58
|
-
features/
|
59
|
-
features/
|
60
|
-
features/
|
61
|
-
features/
|
62
|
-
features/
|
63
|
-
features/
|
64
|
-
features/
|
65
|
-
features/
|
66
|
-
features/
|
67
|
-
features/
|
68
|
-
features/
|
69
|
-
features/
|
70
|
-
features/
|
71
|
-
features/
|
72
|
-
features/
|
73
|
-
features/
|
74
|
-
features/
|
75
|
-
features/
|
76
|
-
features/
|
77
|
-
features/
|
78
|
-
features/
|
79
|
-
features/
|
80
|
-
features/
|
81
|
-
features/
|
82
|
-
features/
|
83
|
-
features/
|
84
|
-
features/
|
85
|
-
features/
|
86
|
-
features/
|
87
|
-
features/
|
88
|
-
features/
|
89
|
-
features/
|
90
|
-
features/
|
91
|
-
features/
|
92
|
-
features/
|
93
|
-
features/
|
94
|
-
features/
|
95
|
-
features/
|
96
|
-
features/
|
97
|
-
features/
|
98
|
-
features/
|
99
|
-
features/
|
100
|
-
features/
|
101
|
-
features/
|
102
|
-
features/
|
103
|
-
features/
|
104
|
-
features/
|
105
|
-
features/
|
106
|
-
features/
|
107
|
-
features/
|
108
|
-
features/
|
109
|
-
features/
|
110
|
-
features/
|
111
|
-
features/
|
29
|
+
etc/mesg.d/c_builtin/en_US/messages.yml
|
30
|
+
etc/mesg.d/c_builtin/ja_JP/messages.yml
|
31
|
+
etc/mesg.d/core/en_US/messages.yml
|
32
|
+
etc/mesg.d/core/ja_JP/messages.yml
|
33
|
+
features/code_check/E0013.feature
|
34
|
+
features/code_check/W0001.feature
|
35
|
+
features/code_check/W0002.feature
|
36
|
+
features/code_check/W0003.feature
|
37
|
+
features/code_check/W0007.feature
|
38
|
+
features/code_check/W0010.feature
|
39
|
+
features/code_check/W0013.feature
|
40
|
+
features/code_check/W0016.feature
|
41
|
+
features/code_check/W0017.feature
|
42
|
+
features/code_check/W0025.feature
|
43
|
+
features/code_check/W0026.feature
|
44
|
+
features/code_check/W0093.feature
|
45
|
+
features/code_check/W0104.feature
|
46
|
+
features/code_check/W0109.feature
|
47
|
+
features/code_check/W0119.feature
|
48
|
+
features/code_check/W0120.feature
|
49
|
+
features/code_check/W0121.feature
|
50
|
+
features/code_check/W0122.feature
|
51
|
+
features/code_check/W0123.feature
|
52
|
+
features/code_check/W0124.feature
|
53
|
+
features/code_check/W0125.feature
|
54
|
+
features/code_check/W0126.feature
|
55
|
+
features/code_check/W0127.feature
|
56
|
+
features/code_check/W0128.feature
|
57
|
+
features/code_check/W0129.feature
|
58
|
+
features/code_check/W0130.feature
|
59
|
+
features/code_check/W0131.feature
|
60
|
+
features/code_check/W0132.feature
|
61
|
+
features/code_check/W0133.feature
|
62
|
+
features/code_check/W0134.feature
|
63
|
+
features/code_check/W0135.feature
|
64
|
+
features/code_check/W0136.feature
|
65
|
+
features/code_check/W0137.feature
|
66
|
+
features/code_check/W0138.feature
|
67
|
+
features/code_check/W0139.feature
|
68
|
+
features/code_check/W0140.feature
|
69
|
+
features/code_check/W0141.feature
|
70
|
+
features/code_check/W0142.feature
|
71
|
+
features/code_check/W0143.feature
|
72
|
+
features/code_check/W0144.feature
|
73
|
+
features/code_check/W0145.feature
|
74
|
+
features/code_check/W0146.feature
|
75
|
+
features/code_check/W0147.feature
|
76
|
+
features/code_check/W0148.feature
|
77
|
+
features/code_check/W0149.feature
|
78
|
+
features/code_check/W0150.feature
|
79
|
+
features/code_check/W0151.feature
|
80
|
+
features/code_check/W0152.feature
|
81
|
+
features/code_check/W0153.feature
|
82
|
+
features/code_check/W0154.feature
|
83
|
+
features/code_check/W0155.feature
|
84
|
+
features/code_check/W0156.feature
|
85
|
+
features/code_check/W0157.feature
|
86
|
+
features/code_check/W0158.feature
|
87
|
+
features/code_check/W0159.feature
|
88
|
+
features/code_check/W0160.feature
|
89
|
+
features/code_check/W0161.feature
|
90
|
+
features/code_check/W0162.feature
|
91
|
+
features/code_check/W0163.feature
|
92
|
+
features/code_check/W0164.feature
|
93
|
+
features/code_check/W0165.feature
|
94
|
+
features/code_check/W0166.feature
|
95
|
+
features/code_check/W0167.feature
|
96
|
+
features/code_check/W0168.feature
|
97
|
+
features/code_check/W0169.feature
|
98
|
+
features/code_check/W0170.feature
|
99
|
+
features/code_check/W0171.feature
|
100
|
+
features/code_check/W0172.feature
|
101
|
+
features/code_check/W0173.feature
|
102
|
+
features/code_check/W0174.feature
|
103
|
+
features/code_check/W0175.feature
|
104
|
+
features/code_check/W0176.feature
|
105
|
+
features/code_check/W0177.feature
|
106
|
+
features/code_check/W0178.feature
|
107
|
+
features/code_check/W0179.feature
|
108
|
+
features/code_check/W0180.feature
|
109
|
+
features/code_check/W0181.feature
|
110
|
+
features/code_check/W0182.feature
|
111
|
+
features/code_check/W0183.feature
|
112
|
+
features/code_check/W0184.feature
|
113
|
+
features/code_check/W0185.feature
|
114
|
+
features/code_check/W0186.feature
|
115
|
+
features/code_check/W0187.feature
|
116
|
+
features/code_check/W0188.feature
|
117
|
+
features/code_check/W0189.feature
|
118
|
+
features/code_check/W0190.feature
|
119
|
+
features/code_check/W0191.feature
|
120
|
+
features/code_check/W0192.feature
|
121
|
+
features/code_check/W0193.feature
|
122
|
+
features/code_check/W0194.feature
|
123
|
+
features/code_check/W0195.feature
|
124
|
+
features/code_check/W0196.feature
|
125
|
+
features/code_check/W0197.feature
|
126
|
+
features/code_check/W0198.feature
|
127
|
+
features/code_check/W0199.feature
|
128
|
+
features/code_check/W0200.feature
|
129
|
+
features/code_check/W0201.feature
|
130
|
+
features/code_check/W0202.feature
|
131
|
+
features/code_check/W0203.feature
|
132
|
+
features/code_check/W0204.feature
|
133
|
+
features/code_check/W0205.feature
|
134
|
+
features/code_check/W0206.feature
|
135
|
+
features/code_check/W0207.feature
|
136
|
+
features/code_check/W0208.feature
|
137
|
+
features/code_check/W0209.feature
|
138
|
+
features/code_check/W0210.feature
|
139
|
+
features/code_check/W0211.feature
|
140
|
+
features/code_check/W0212.feature
|
141
|
+
features/code_check/W0213.feature
|
142
|
+
features/code_check/W0214.feature
|
143
|
+
features/code_check/W0215.feature
|
144
|
+
features/code_check/W0216.feature
|
145
|
+
features/code_check/W0217.feature
|
146
|
+
features/code_check/W0218.feature
|
147
|
+
features/code_check/W0219.feature
|
148
|
+
features/code_check/W0220.feature
|
149
|
+
features/code_check/W0221.feature
|
150
|
+
features/code_check/W0222.feature
|
151
|
+
features/code_check/W0223.feature
|
152
|
+
features/code_check/W0224.feature
|
153
|
+
features/code_check/W0225.feature
|
154
|
+
features/code_check/W0226.feature
|
155
|
+
features/code_check/W0227.feature
|
156
|
+
features/code_check/W0228.feature
|
157
|
+
features/code_check/W0229.feature
|
158
|
+
features/code_check/W0230.feature
|
159
|
+
features/code_check/W0231.feature
|
160
|
+
features/code_check/W0232.feature
|
161
|
+
features/code_check/W0233.feature
|
162
|
+
features/code_check/W0234.feature
|
163
|
+
features/code_check/W0235.feature
|
164
|
+
features/code_check/W0236.feature
|
165
|
+
features/code_check/W0237.feature
|
166
|
+
features/code_check/W0238.feature
|
167
|
+
features/code_check/W0239.feature
|
168
|
+
features/code_check/W0240.feature
|
169
|
+
features/code_check/W0241.feature
|
170
|
+
features/code_check/W0242.feature
|
171
|
+
features/code_check/W0243.feature
|
172
|
+
features/code_check/W0244.feature
|
173
|
+
features/code_check/W0245.feature
|
174
|
+
features/code_check/W0246.feature
|
175
|
+
features/code_check/W0247.feature
|
176
|
+
features/code_check/W0248.feature
|
177
|
+
features/code_check/W0249.feature
|
178
|
+
features/code_check/W0250.feature
|
179
|
+
features/code_check/W0251.feature
|
180
|
+
features/code_check/W0252.feature
|
181
|
+
features/code_check/W0253.feature
|
182
|
+
features/code_check/W0254.feature
|
183
|
+
features/code_check/W0477.feature
|
184
|
+
features/code_check/W0478.feature
|
185
|
+
features/code_check/W0479.feature
|
186
|
+
features/code_check/W0480.feature
|
187
|
+
features/code_check/W0481.feature
|
188
|
+
features/code_check/W0482.feature
|
189
|
+
features/code_check/W0483.feature
|
190
|
+
features/code_check/W0573.feature
|
191
|
+
features/code_check/W0583.feature
|
192
|
+
features/code_check/W0606.feature
|
193
|
+
features/code_check/W0641.feature
|
194
|
+
features/code_check/W0643.feature
|
195
|
+
features/code_check/W0644.feature
|
196
|
+
features/code_check/W0645.feature
|
197
|
+
features/code_check/W0646.feature
|
198
|
+
features/code_check/W0649.feature
|
199
|
+
features/code_check/W0650.feature
|
200
|
+
features/code_check/W0685.feature
|
201
|
+
features/code_check/W0686.feature
|
202
|
+
features/code_check/W0687.feature
|
203
|
+
features/code_check/W0688.feature
|
204
|
+
features/code_check/W0689.feature
|
205
|
+
features/code_check/W0690.feature
|
206
|
+
features/code_check/W0691.feature
|
207
|
+
features/code_check/W0692.feature
|
208
|
+
features/code_check/W0694.feature
|
209
|
+
features/code_check/W0695.feature
|
210
|
+
features/code_check/W0697.feature
|
211
|
+
features/code_check/W0698.feature
|
212
|
+
features/code_check/W0699.feature
|
213
|
+
features/code_check/W0700.feature
|
214
|
+
features/code_check/W0703.feature
|
215
|
+
features/code_check/W0705.feature
|
216
|
+
features/code_check/W0707.feature
|
217
|
+
features/code_check/W0711.feature
|
218
|
+
features/code_check/W0712.feature
|
219
|
+
features/code_check/W0713.feature
|
220
|
+
features/code_check/W0714.feature
|
221
|
+
features/code_check/W0715.feature
|
222
|
+
features/code_check/W0716.feature
|
223
|
+
features/code_check/W0717.feature
|
224
|
+
features/code_check/W0718.feature
|
225
|
+
features/code_check/W0719.feature
|
226
|
+
features/code_check/W0723.feature
|
227
|
+
features/code_check/W0726.feature
|
228
|
+
features/code_check/W0732.feature
|
229
|
+
features/code_check/W0733.feature
|
230
|
+
features/code_check/W0734.feature
|
231
|
+
features/code_check/W0735.feature
|
232
|
+
features/code_check/W0745.feature
|
233
|
+
features/code_check/W0747.feature
|
234
|
+
features/code_check/W0748.feature
|
235
|
+
features/code_check/W0749.feature
|
236
|
+
features/code_check/W0750.feature
|
237
|
+
features/code_check/W0751.feature
|
238
|
+
features/code_check/W0752.feature
|
239
|
+
features/code_check/W0753.feature
|
240
|
+
features/code_check/W0754.feature
|
241
|
+
features/code_check/W0755.feature
|
242
|
+
features/code_check/W0756.feature
|
243
|
+
features/code_check/W0757.feature
|
244
|
+
features/code_check/W0758.feature
|
245
|
+
features/code_check/W0759.feature
|
246
|
+
features/code_check/W0760.feature
|
247
|
+
features/code_check/W0761.feature
|
248
|
+
features/code_check/W0762.feature
|
249
|
+
features/code_check/W0763.feature
|
250
|
+
features/code_check/W0764.feature
|
251
|
+
features/code_check/W0765.feature
|
252
|
+
features/code_check/W0766.feature
|
253
|
+
features/code_check/W0767.feature
|
254
|
+
features/code_check/W0768.feature
|
255
|
+
features/code_check/W0769.feature
|
256
|
+
features/code_check/W0780.feature
|
257
|
+
features/code_check/W0781.feature
|
258
|
+
features/code_check/W0783.feature
|
259
|
+
features/code_check/W0792.feature
|
260
|
+
features/code_check/W0793.feature
|
261
|
+
features/code_check/W0794.feature
|
262
|
+
features/code_check/W0801.feature
|
263
|
+
features/code_check/W0805.feature
|
264
|
+
features/code_check/W0806.feature
|
265
|
+
features/code_check/W0807.feature
|
266
|
+
features/code_check/W0808.feature
|
267
|
+
features/code_check/W0809.feature
|
268
|
+
features/code_check/W0811.feature
|
269
|
+
features/code_check/W0830.feature
|
270
|
+
features/code_check/W0833.feature
|
271
|
+
features/code_check/W0834.feature
|
272
|
+
features/code_check/W1026.feature
|
273
|
+
features/code_check/W1030.feature
|
274
|
+
features/code_check/W1031.feature
|
275
|
+
features/code_check/W1039.feature
|
276
|
+
features/code_check/W1040.feature
|
277
|
+
features/code_check/W1041.feature
|
278
|
+
features/code_check/W1046.feature
|
279
|
+
features/code_check/W1047.feature
|
280
|
+
features/code_check/W1052.feature
|
281
|
+
features/code_check/W1066.feature
|
282
|
+
features/code_check/W1067.feature
|
283
|
+
features/code_check/W1068.feature
|
284
|
+
features/code_check/W1069.feature
|
285
|
+
features/code_check/W1070.feature
|
286
|
+
features/code_check/W1071.feature
|
287
|
+
features/code_check/W1072.feature
|
288
|
+
features/code_check/W1073.feature
|
289
|
+
features/code_check/W1074.feature
|
290
|
+
features/code_check/W1075.feature
|
291
|
+
features/code_check/W1076.feature
|
292
|
+
features/code_check/W1077.feature
|
293
|
+
features/code_check/W9001.feature
|
294
|
+
features/code_check/W9003.feature
|
295
|
+
features/step_definitions/code_check_steps.rb
|
112
296
|
features/support/env.rb
|
113
297
|
lib/adlint.rb
|
114
298
|
lib/adlint/analyzer.rb
|
115
299
|
lib/adlint/c.rb
|
116
300
|
lib/adlint/c/branch.rb
|
117
301
|
lib/adlint/c/builtin.rb
|
118
|
-
lib/adlint/c/code.rb
|
119
302
|
lib/adlint/c/const.rb
|
120
303
|
lib/adlint/c/conv.rb
|
121
304
|
lib/adlint/c/ctrlexpr.rb
|
@@ -127,9 +310,6 @@ lib/adlint/c/format.rb
|
|
127
310
|
lib/adlint/c/interp.rb
|
128
311
|
lib/adlint/c/lexer.rb
|
129
312
|
lib/adlint/c/mediator.rb
|
130
|
-
lib/adlint/c/message.rb
|
131
|
-
lib/adlint/c/message_shima.rb
|
132
|
-
lib/adlint/c/metric.rb
|
133
313
|
lib/adlint/c/object.rb
|
134
314
|
lib/adlint/c/operator.rb
|
135
315
|
lib/adlint/c/option.rb
|
@@ -147,14 +327,11 @@ lib/adlint/c/value.rb
|
|
147
327
|
lib/adlint/code.rb
|
148
328
|
lib/adlint/cpp.rb
|
149
329
|
lib/adlint/cpp/asm.rb
|
150
|
-
lib/adlint/cpp/code.rb
|
151
330
|
lib/adlint/cpp/constexpr.rb
|
152
331
|
lib/adlint/cpp/constexpr.y
|
153
332
|
lib/adlint/cpp/eval.rb
|
154
333
|
lib/adlint/cpp/lexer.rb
|
155
334
|
lib/adlint/cpp/macro.rb
|
156
|
-
lib/adlint/cpp/message.rb
|
157
|
-
lib/adlint/cpp/message_shima.rb
|
158
335
|
lib/adlint/cpp/phase.rb
|
159
336
|
lib/adlint/cpp/scanner.rb
|
160
337
|
lib/adlint/cpp/source.rb
|
@@ -163,10 +340,19 @@ lib/adlint/cpp/syntax.rb
|
|
163
340
|
lib/adlint/cpp/util.rb
|
164
341
|
lib/adlint/driver.rb
|
165
342
|
lib/adlint/error.rb
|
343
|
+
lib/adlint/exam.rb
|
344
|
+
lib/adlint/exam/c_builtin.rb
|
345
|
+
lib/adlint/exam/c_builtin/c_check.rb
|
346
|
+
lib/adlint/exam/c_builtin/c_check_shima.rb
|
347
|
+
lib/adlint/exam/c_builtin/c_code.rb
|
348
|
+
lib/adlint/exam/c_builtin/c_metric.rb
|
349
|
+
lib/adlint/exam/c_builtin/cpp_check.rb
|
350
|
+
lib/adlint/exam/c_builtin/cpp_check_shima.rb
|
351
|
+
lib/adlint/exam/c_builtin/cpp_code.rb
|
352
|
+
lib/adlint/exam/c_builtin/ld_check.rb
|
353
|
+
lib/adlint/exam/c_builtin/ld_metric.rb
|
166
354
|
lib/adlint/lang.rb
|
167
355
|
lib/adlint/ld.rb
|
168
|
-
lib/adlint/ld/message.rb
|
169
|
-
lib/adlint/ld/metric.rb
|
170
356
|
lib/adlint/ld/object.rb
|
171
357
|
lib/adlint/ld/phase.rb
|
172
358
|
lib/adlint/ld/typedef.rb
|
data/NEWS
CHANGED
@@ -21,17 +21,29 @@
|
|
21
21
|
|
22
22
|
++
|
23
23
|
|
24
|
-
=== \AdLint
|
24
|
+
=== \AdLint 2.0.0 is released (2012-08-22)
|
25
25
|
|
26
|
-
==== Changes since the 1.18.
|
26
|
+
==== Changes since the 1.18.6 release
|
27
27
|
|
28
|
-
*
|
29
|
-
|
28
|
+
* In preparation for using optional source code examination packages, refine
|
29
|
+
internal module structure and revise format of the traits file
|
30
|
+
* Revise format of the traits file and the message definition file in
|
31
|
+
preparation for supporting selective code check feature
|
32
|
+
* Revise format of the traits file in preparation for supporting warning
|
33
|
+
suppression of unconcerned headers such as system headers
|
34
|
+
* Add many more functional specifications of builtin code checks
|
30
35
|
|
31
36
|
See the file
|
32
37
|
{ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
|
33
38
|
for more details.
|
34
39
|
|
40
|
+
=== \AdLint 1.18.6 is released (2012-08-14)
|
41
|
+
|
42
|
+
==== Changes since the 1.18.2 release
|
43
|
+
|
44
|
+
* Fix abend problem when a variable of typedefed incomplete array type is
|
45
|
+
defined with an initializer
|
46
|
+
|
35
47
|
=== \AdLint 1.18.2 is released (2012-08-03)
|
36
48
|
|
37
49
|
==== Changes since the 1.18.0 release
|
data/bin/adlintize
CHANGED
@@ -69,6 +69,7 @@ Options:
|
|
69
69
|
--version Display version information
|
70
70
|
--copyright Display copyright information
|
71
71
|
--prefix Display prefix directory of AdLint
|
72
|
+
--migrate FILE Migrate format of the specified traits file
|
72
73
|
-h, --help Display this message
|
73
74
|
EOS
|
74
75
|
|
@@ -86,6 +87,123 @@ def print_environments
|
|
86
87
|
end
|
87
88
|
end
|
88
89
|
|
90
|
+
# TODO: Refine this ad-hoc schema migration.
|
91
|
+
def migrate_traits_schema(traits_fpath)
|
92
|
+
unless traits_fpath.exist? && traits_fpath.file?
|
93
|
+
$stderr.puts "#{File.basename(__FILE__)} : no such traits file"
|
94
|
+
exit 1
|
95
|
+
end
|
96
|
+
|
97
|
+
contents = File.open(traits_fpath, "r:utf-8") { |io| io.read }
|
98
|
+
return unless contents =~ /^version: "1\.0\.0"$/
|
99
|
+
|
100
|
+
backup_traits_file(traits_fpath, %w(.orig .old .mig))
|
101
|
+
File.open(traits_fpath, "w:utf-8") do |io|
|
102
|
+
io.puts "# Traits file migrated by adlintize #{AdLint::SHORT_VERSION}.", ""
|
103
|
+
change_list = []
|
104
|
+
contents.lines.map { |str| str.chomp }.each do |line|
|
105
|
+
case line
|
106
|
+
when /\Aversion:/
|
107
|
+
io.puts "version: \"2.0.0\"", ""
|
108
|
+
io.puts <<EOS
|
109
|
+
# List of names of source code examination packages.
|
110
|
+
#
|
111
|
+
# "c_builtin" is a builtin source code examination package for C language.
|
112
|
+
# You can install optional examination packages and append (or replace) this
|
113
|
+
# list to specify which examination packages are to be run.
|
114
|
+
exam_packages:
|
115
|
+
- "c_builtin"
|
116
|
+
EOS
|
117
|
+
when /\Amessage_traits:/
|
118
|
+
io.puts <<EOS
|
119
|
+
message_traits:
|
120
|
+
|
121
|
+
# Output messages with category and severity information?
|
122
|
+
message_with_class: false
|
123
|
+
|
124
|
+
# Warn only files in the specified directory. If omitted, all files (such as
|
125
|
+
# system headers or 3rd-party library headers) will be warned.
|
126
|
+
warn_only_files_in:
|
127
|
+
|
128
|
+
# Enable translation-unit specific code check selection?
|
129
|
+
individual_selection: true
|
130
|
+
|
131
|
+
# Project-wide code check exclusion settings.
|
132
|
+
# Ex.
|
133
|
+
# exclusion:
|
134
|
+
# categories:
|
135
|
+
# - "REL"
|
136
|
+
# - "PRT"
|
137
|
+
# severities: "[ABC][5-9][0-9]"
|
138
|
+
# messages:
|
139
|
+
# W0001: "c_builtin"
|
140
|
+
# W0002: "c_ansi"
|
141
|
+
exclusion:
|
142
|
+
|
143
|
+
# Project-wide code check inclusion settings.
|
144
|
+
# Ex.
|
145
|
+
# inclusion:
|
146
|
+
# messages:
|
147
|
+
# W0001: "c_builtin"
|
148
|
+
# W0002: "c_ansi"
|
149
|
+
inclusion:
|
150
|
+
EOS
|
151
|
+
when /\A change_list:/, /\A [WCEX]\d{4}\s*:/
|
152
|
+
# NOTE: change_list will be migrated later.
|
153
|
+
change_list.push(line)
|
154
|
+
else
|
155
|
+
io.puts line
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
change_list.each do |line|
|
160
|
+
case line
|
161
|
+
when /\A change_list:/
|
162
|
+
io.puts <<EOS
|
163
|
+
# Message text replacement for AdLint 2.0.0 or later.
|
164
|
+
# Ex.
|
165
|
+
# change_list:
|
166
|
+
# W9999:
|
167
|
+
# package: "c_builtin"
|
168
|
+
# classes:
|
169
|
+
# - "REL:A10"
|
170
|
+
# - "PRT:B20"
|
171
|
+
# format: "Your custom message for the warning of W9999."
|
172
|
+
# X9999:
|
173
|
+
# package: "core"
|
174
|
+
# classes:
|
175
|
+
# - "ERR:X99"
|
176
|
+
# format: "Your custom message for the warning of X9999."
|
177
|
+
# E9999:
|
178
|
+
# package: "core"
|
179
|
+
# classes:
|
180
|
+
# - "ERR:X99"
|
181
|
+
# format: "Your custom message for the warning of E9999."
|
182
|
+
change_list:
|
183
|
+
EOS
|
184
|
+
when /\A ([WCEX]\d{4})\s*:(.*)\z/
|
185
|
+
io.puts <<EOS
|
186
|
+
#{$1}:
|
187
|
+
package: "c_builtin"
|
188
|
+
classes:
|
189
|
+
- "UNC:X99"
|
190
|
+
format:#{$2}
|
191
|
+
EOS
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
def backup_traits_file(traits_fpath, suffixes)
|
198
|
+
suffixes.each do |suffix|
|
199
|
+
backup_fpath = Pathname.new("#{traits_fpath}#{suffix}")
|
200
|
+
unless backup_fpath.exist?
|
201
|
+
FileUtils.cp(traits_fpath, backup_fpath)
|
202
|
+
break
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
89
207
|
require "getoptlong"
|
90
208
|
|
91
209
|
parser = GetoptLong.new(["--traits", "-t", GetoptLong::REQUIRED_ARGUMENT],
|
@@ -102,6 +220,7 @@ parser = GetoptLong.new(["--traits", "-t", GetoptLong::REQUIRED_ARGUMENT],
|
|
102
220
|
["--version", GetoptLong::NO_ARGUMENT],
|
103
221
|
["--copyright", GetoptLong::NO_ARGUMENT],
|
104
222
|
["--prefix", GetoptLong::NO_ARGUMENT],
|
223
|
+
["--migrate", GetoptLong::REQUIRED_ARGUMENT],
|
105
224
|
["--help", "-h", GetoptLong::NO_ARGUMENT])
|
106
225
|
|
107
226
|
begin
|
@@ -150,6 +269,9 @@ begin
|
|
150
269
|
when "--prefix"
|
151
270
|
puts $prefix
|
152
271
|
exit 0
|
272
|
+
when "--migrate"
|
273
|
+
migrate_traits_schema(Pathname.new(value))
|
274
|
+
exit 0
|
153
275
|
when "--help"
|
154
276
|
puts $usage
|
155
277
|
exit 0
|
@@ -162,7 +284,8 @@ end
|
|
162
284
|
|
163
285
|
project_name = ARGV.empty? ? Pathname.getwd.each_filename.to_a.last : ARGV[0]
|
164
286
|
|
165
|
-
FileUtils.mkdir_p(output_dpath)
|
287
|
+
FileUtils.mkdir_p(output_dpath) unless Dir.exist?(output_dpath)
|
288
|
+
vpath = Pathname.pwd.relative_path_from(Pathname.new(output_dpath).realpath)
|
166
289
|
|
167
290
|
traits_fpath = traits_fpath.expand_path(output_dpath)
|
168
291
|
pinit_fpath = pinit_fpath.expand_path(output_dpath)
|
@@ -241,8 +364,6 @@ else
|
|
241
364
|
exit 1
|
242
365
|
end
|
243
366
|
|
244
|
-
vpath = Pathname.pwd.relative_path_from(Pathname.new(output_dpath).realpath)
|
245
|
-
|
246
367
|
if !File.exist?(list_fpath) || force_overwrite
|
247
368
|
File.open(list_fpath, "w") do |io|
|
248
369
|
io.set_encoding(Encoding::UTF_8)
|