adlint 2.2.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. data/AUTHORS +0 -1
  2. data/ChangeLog +185 -1
  3. data/MANIFEST +3 -0
  4. data/NEWS +28 -5
  5. data/bin/adlintize +70 -7
  6. data/etc/conf.d/fallback/traits.erb +12 -3
  7. data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +12 -3
  8. data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +12 -3
  9. data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +12 -3
  10. data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +12 -3
  11. data/etc/conf.d/x86_64-ubuntu_12.04/traits-gcc_4.6.3.erb +12 -4
  12. data/etc/mesg.d/c_builtin/en_US/messages.yml +1 -1
  13. data/etc/mesg.d/c_builtin/ja_JP/messages.yml +1 -1
  14. data/etc/mesg.d/core/en_US/messages.yml +1 -1
  15. data/etc/mesg.d/core/ja_JP/messages.yml +1 -1
  16. data/features/code_check/W0070.feature +51 -0
  17. data/features/code_check/W0071.feature +51 -0
  18. data/features/code_check/W0425.feature +279 -0
  19. data/features/code_check/W0692.feature +14 -1
  20. data/features/code_check/W0834.feature +7 -5
  21. data/features/code_check/W1073.feature +0 -1
  22. data/features/code_check/W1074.feature +6 -0
  23. data/features/code_check/W9003.feature +54 -0
  24. data/features/support/env.rb +15 -3
  25. data/lib/adlint/c/expr.rb +30 -6
  26. data/lib/adlint/c/interp.rb +4 -0
  27. data/lib/adlint/cpp/eval.rb +24 -14
  28. data/lib/adlint/cpp/macro.rb +52 -40
  29. data/lib/adlint/exam/c_builtin/c_check.rb +76 -42
  30. data/lib/adlint/exam/c_builtin/cpp_check.rb +4 -2
  31. data/lib/adlint/traits.rb +37 -23
  32. data/lib/adlint/util.rb +6 -0
  33. data/lib/adlint/version.rb +3 -3
  34. data/share/doc/developers_guide_ja.html +3 -3
  35. data/share/doc/developers_guide_ja.texi +1 -1
  36. data/share/doc/users_guide_en.html +1679 -1651
  37. data/share/doc/users_guide_en.texi +56 -24
  38. data/share/doc/users_guide_ja.html +1697 -1669
  39. data/share/doc/users_guide_ja.texi +57 -24
  40. data/share/sample/bison-2.5/adlint/adlint_traits.yml +13 -4
  41. data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +13 -4
  42. data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +13 -4
  43. data/share/sample/ctags-5.8/adlint/adlint_traits.yml +13 -4
  44. data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +13 -4
  45. data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +13 -4
  46. data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +13 -4
  47. data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +13 -4
  48. data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +13 -4
  49. data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +13 -4
  50. data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +13 -4
  51. data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +13 -4
  52. data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +13 -4
  53. data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +13 -4
  54. data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +13 -4
  55. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +13 -4
  56. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +13 -4
  57. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +13 -4
  58. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +13 -4
  59. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +13 -4
  60. data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +13 -4
  61. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +13 -4
  62. data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +13 -4
  63. data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +13 -4
  64. data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +13 -4
  65. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +13 -4
  66. data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +13 -4
  67. data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +13 -4
  68. data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +13 -4
  69. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +13 -4
  70. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +13 -4
  71. data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +13 -4
  72. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +13 -4
  73. data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +13 -4
  74. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +13 -4
  75. data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +13 -4
  76. data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +13 -4
  77. data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +13 -4
  78. data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +13 -4
  79. data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +13 -4
  80. data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +13 -4
  81. data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +13 -4
  82. data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +13 -4
  83. data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +13 -4
  84. data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +13 -4
  85. data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +13 -4
  86. data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +13 -4
  87. data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +13 -4
  88. data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +13 -4
  89. data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +13 -4
  90. data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +13 -4
  91. data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +13 -4
  92. data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +13 -4
  93. data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +13 -4
  94. data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +13 -4
  95. data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +13 -4
  96. data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +13 -4
  97. data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +13 -4
  98. data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +13 -4
  99. data/spec/conf.d/default_traits.yml +12 -4
  100. metadata +5 -2
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_en.info
3
3
  @documentlanguage en
4
4
  @documentencoding utf-8
5
- @settitle AdLint 2.2.0 User's Guide
5
+ @settitle AdLint 2.4.0 User's Guide
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -883,6 +883,18 @@ And embed environment variables in a string value like below;
883
883
  item: "prefix${ENV_VAR}suffix"
884
884
  @end verbatim
885
885
 
886
+ You can also specify multiple values of directory pathname list item by one
887
+ environment variable like below;
888
+
889
+ @verbatim
890
+ % export ENV_VAR="/usr/local/include:/usr/include"
891
+ @end verbatim
892
+
893
+ @verbatim
894
+ include_path:
895
+ - $ENV_VAR
896
+ @end verbatim
897
+
886
898
 
887
899
  @node Global Traits
888
900
  @subsection Global Traits
@@ -955,6 +967,15 @@ string
955
967
  @tab
956
968
  Set project name.
957
969
  @item 2
970
+ @cindex project_traits:project_root
971
+ @anchor{project_traits:project_root}
972
+ @tab
973
+ @code{project_root}
974
+ @tab
975
+ string
976
+ @tab
977
+ Set pathname of the project root directory.
978
+ @item 3
958
979
  @cindex project_traits:include_path
959
980
  @anchor{project_traits:include_path}
960
981
  @tab
@@ -963,7 +984,8 @@ Set project name.
963
984
  array of string
964
985
  @tab
965
986
  Set project specific include path.
966
- @item 3
987
+ An entry can have multiple pathnames with @code{`:'} separators.
988
+ @item 4
967
989
  @cindex project_traits:initial_header
968
990
  @anchor{project_traits:initial_header}
969
991
  @tab
@@ -974,7 +996,7 @@ string
974
996
  Set the header files which is included at the top of specified source files.
975
997
  For example, project specific macro definition will be described in this file.
976
998
 
977
- @item 4
999
+ @item 5
978
1000
  @cindex project_traits:coding_style:indent_style
979
1001
  @anchor{project_traits:coding_style:indent_style}
980
1002
  @tab
@@ -1021,7 +1043,7 @@ foo(int i)
1021
1043
  @}
1022
1044
  @end example
1023
1045
 
1024
- @item 5
1046
+ @item 6
1025
1047
  @cindex project_traits:coding_style:tab_width
1026
1048
  @anchor{project_traits:coding_style:tab_width}
1027
1049
  @tab
@@ -1030,7 +1052,7 @@ foo(int i)
1030
1052
  integer value
1031
1053
  @tab
1032
1054
  Set the appearance number of digits of tab character
1033
- @item 6
1055
+ @item 7
1034
1056
  @cindex project_traits:coding_style:indent_width
1035
1057
  @anchor{project_traits:coding_style:indent_width}
1036
1058
  @tab
@@ -1039,7 +1061,7 @@ Set the appearance number of digits of tab character
1039
1061
  integer value
1040
1062
  @tab
1041
1063
  Set the appearance number of digits of indent
1042
- @item 7
1064
+ @item 8
1043
1065
  @cindex project_traits:file_encoding
1044
1066
  @anchor{project_traits:file_encoding}
1045
1067
  @tab
@@ -1268,6 +1290,7 @@ If @code{`char'} type treat as @code{`unsigned char'}, set true.
1268
1290
  array of string
1269
1291
  @tab
1270
1292
  Set the compiler specific include path.
1293
+ An entry can have multiple pathnames with @code{`:'} separators.
1271
1294
  @item 24
1272
1295
  @cindex compiler_traits:arithmetic:logical_right_shift
1273
1296
  @anchor{compiler_traits:arithmetic:logical_right_shift}
@@ -1377,22 +1400,32 @@ In case of @code{true}, AdLint will output messages with name of the
1377
1400
  examination package, message category and message severity to the @ref{Message
1378
1401
  File, message file}.
1379
1402
  @item 3
1380
- @cindex message_traits:warn_only_files_in
1381
- @anchor{message_traits:warn_only_files_in}
1403
+ @cindex message_traits:warn_files_in
1404
+ @anchor{message_traits:warn_files_in}
1382
1405
  @tab
1383
- @code{warn_only_files_in}
1406
+ @code{warn_files_in}
1384
1407
  @tab
1385
- string
1408
+ array of string
1386
1409
  @tab
1387
- @b{This item has no effect on AdLint 2.0.0, yet.}
1388
-
1389
- This item represents root directory path of the target project.
1410
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1390
1411
 
1391
1412
  If a directory path is specified, AdLint will output warning messages about
1392
1413
  source files located under the specified directory.
1393
1414
  If omitted, AdLint will output warning messages about all the files included by
1394
1415
  the target source files such as system headers or 3rd-party library headers.
1395
1416
  @item 4
1417
+ @cindex message_traits:warn_files_not_in
1418
+ @anchor{message_traits:warn_files_not_in}
1419
+ @tab
1420
+ @code{warn_files_not_in}
1421
+ @tab
1422
+ array of string
1423
+ @tab
1424
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1425
+
1426
+ If a directory path is specified, AdLint will suppress warning messages about
1427
+ source files located under the specified directory.
1428
+ @item 5
1396
1429
  @cindex message_traits:individual_selection
1397
1430
  @anchor{message_traits:individual_selection}
1398
1431
  @tab
@@ -1400,13 +1433,13 @@ the target source files such as system headers or 3rd-party library headers.
1400
1433
  @tab
1401
1434
  boolean
1402
1435
  @tab
1403
- @b{This item has no effect on AdLint 2.0.0, yet.}
1436
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1404
1437
 
1405
1438
  This item enables code check selection by annotations in the target source
1406
1439
  files.
1407
1440
 
1408
1441
  In case of @code{true}, code check selection by annotations will be enabled.
1409
- @item 5
1442
+ @item 6
1410
1443
  @cindex message_traits:exclusion:categories
1411
1444
  @anchor{message_traits:exclusion:categories}
1412
1445
  @tab
@@ -1414,10 +1447,10 @@ In case of @code{true}, code check selection by annotations will be enabled.
1414
1447
  @tab
1415
1448
  array of string
1416
1449
  @tab
1417
- @b{This item has no effect on AdLint 2.0.0, yet.}
1450
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1418
1451
 
1419
1452
  This item represents excluding code checks by its message categories.
1420
- @item 6
1453
+ @item 7
1421
1454
  @cindex message_traits:exclusion:severities
1422
1455
  @anchor{message_traits:exclusion:severities}
1423
1456
  @tab
@@ -1425,10 +1458,10 @@ This item represents excluding code checks by its message categories.
1425
1458
  @tab
1426
1459
  regexp string
1427
1460
  @tab
1428
- @b{This item has no effect on AdLint 2.0.0, yet.}
1461
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1429
1462
 
1430
1463
  This item represents excluding code checks by its message severities.
1431
- @item 7
1464
+ @item 8
1432
1465
  @cindex message_traits:exclusion:messages
1433
1466
  @anchor{message_traits:exclusion:messages}
1434
1467
  @tab
@@ -1436,13 +1469,13 @@ This item represents excluding code checks by its message severities.
1436
1469
  @tab
1437
1470
  map of Message ID and string
1438
1471
  @tab
1439
- @b{This item has no effect on AdLint 2.0.0, yet.}
1472
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1440
1473
 
1441
1474
  This item represents excluding code checks by its message ID.
1442
1475
 
1443
1476
  Because a message ID is not unique in multiple examination packages, you should
1444
1477
  also specify the name of the examination package including the message.
1445
- @item 8
1478
+ @item 9
1446
1479
  @cindex message_traits:inclusion:messages
1447
1480
  @anchor{message_traits:inclusion:messages}
1448
1481
  @tab
@@ -1450,15 +1483,14 @@ also specify the name of the examination package including the message.
1450
1483
  @tab
1451
1484
  map of Message ID and string
1452
1485
  @tab
1453
- @b{This item has no effect on AdLint 2.0.0, yet.}
1486
+ @b{This item has no effect on AdLint 2.4.0, yet.}
1454
1487
 
1455
1488
  This item represents messages which is excluded by settings of @code{exclusion}
1456
1489
  section but will be used by AdLint.
1457
1490
 
1458
1491
  For example, you can bring back the specified code checks which is excluded by
1459
1492
  @ref{message_traits:exclusion:categories, exclusion:categories}.
1460
- @item 9
1461
- @item 2
1493
+ @item 10
1462
1494
  @cindex message_traits:change_list
1463
1495
  @anchor{message_traits:change_list}
1464
1496
  @tab