summaryrefslogtreecommitdiff
path: root/tools/inspect/doc/inspect.qbk
blob: a16968f377f4bc03f2a48c2c98bdd3b4f92045a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[article Inspect
    [quickbook 1.3]
    [authors [Dawes, Beman], [Prota, Gennaro], [Rivera, Rene]]
    [copyright 2003 2006 Beman Dawes, Rene Rivera]
    [category tool-build]
    [id inspect]
    [dirname inspect]
    [purpose
        The inspect program detects and reports several common errors and
        Boost guideline violations.
    ]
    [license
        Distributed under the Boost Software License, Version 1.0.
        (See accompanying file LICENSE_1_0.txt or copy at
        [@http://www.boost.org/LICENSE_1_0.txt])
    ]
]

[/ QuickBook Document version 1.3 ]

[/ Shortcuts ]

[def :version: 3.1.14]

[/ Images ]

[def :NOTE:                 [$images/note.png]]
[def :ALERT:                [$images/caution.png]]
[def :DETAIL:               [$images/note.png]]
[def :TIP:                  [$images/tip.png]]

[/ Links ]

[def :Boost:                [@http://www.boost.org Boost]]

[section:intro Introduction]

It is not uncommon for various common errors or [@http://www.boost.org/more/lib_guide.htm guideline violations] to creep into the Boost libraries. The inspect program detects and reports several common problems. It can be used to scan a proposed Boost submission to identify various failures.

The inspect program is written in C++ to limit tool chain dependencies, and should be portable to any system.

[endsect]

[section:usage Using Inspect]

The program is run in the directory to be scanned for errors. Sub-directories are also included in the scan. For best results in the generated reports one should run inspect from the Boost root directory. The program generates, by default, an HTML report with summaries and per library details of the infractions.

If the first program argument is -help, a usage message is displayed, showing all available program options:

[pre
Usage: inspect \[search-root\] \[-cvs\] \[-text\] \[-brief\] \[options...\]
 search-root default is the current directory
 Options:
  -license
  -copyright
  -crlf
  -end
  -link
  -path_name
  -tab
  -ascii
  -apple_macro
  -assert_macro
  -deprecated_macro
  -minmax
  -unnamed
 default is all checks on; otherwise options specify desired checks
]

[section:options Options]

There are two types of options allowed, ones that control general operation and kind of output produced, and the ones that indicate the checks to perform.

[variablelist

  [ [[^-cvs]]
    [Only files and directories in the CVS tree of the current directory are scanned. Otherwise all files and sub-directories are included in the scan.] ]

  [ [[^-text]]
    [Generate plain text report instead of the default HTML.] ]

  [ [[^-brief]]
    [The default report style can be rather verobse. This generates a more condesed report, for example suitable to send as an email.] ]

  [ [[^-license]]
    [Checks for presense of approved license text.] ]

  [ [[^-copyright]]
    [Checks that files are copyright assigned to someone.] ]

  [ [[^-crlf]]
    [Checks that files use consistent EOL chanracters.] ]

  [ [[^-end]]
    [Checks that files end with a newline character.] ]

  [ [[^-link]]
    [Checks the validity of URIs in HTML files.] ]

  [ [[^-path_name]]
    [Checks for long names, and a variety of other file name problems that inhibit portability of files.] ]

  [ [[^-tab]]
    [Checks for files with tab characters.] ]

  [ [[^-ascii]]
    [Checks for files with non-ASCII characters.] ]

  [ [[^-apple_macro]]
    [Checks for conflicts with to Apple's unfortunately named debugging macros.] ]

  [ [[^-assert_macro]]
    [Checks for presence of C-style assert macros (instead of BOOST_ASSERT).] ]

  [ [[^-minmax]]
    [Checks for violations of the Boost min/max quidelines.] ]

  [ [[^-unnamed]]
    [Checks for unnamed namespace in C++ header files.] ]

]

[endsect]

[endsect]

[section:checks Checks]

[endsect]