1ACHECK-RULES.5(8)     User Contributed Perl Documentation    ACHECK-RULES.5(8)
2
3
4

NAME

6       set.rules - Rules set for acheck
7

DESCRIPTION

9       Rules set files contain rules to be check by acheck.
10
11       Lines beginning with a number sign (`#') and empty lines will be
12       ignored.  Spaces at the beginning and the end of a line will also be
13       ignored as well as tabulators.  If you need spaces at the end or the
14       beginning of a value you can use apostrophes (`"').  A comment starts
15       with the number sign, there can be any number of spaces and/or tab
16       stops in front of the #.  Long lines can be broken into multiple lines
17       ending with a backslash (`\').  Some possible examples:
18
19        # this line is ignored
20        field    value
21        field    value                               # this is a comment
22        field         "value ending with space   "
23        field    value\
24                 continuing on the next line
25
26       You have to escape number signs with a backslash to use it in a value
27       and use apostrophes if a value ends with a backslash.
28
29       Rule sets are made of lists of rules. Theses lists can be repeated a
30       number of times, until or while a condition happens.
31
32       A rule detects an error if the corresponding test succeeds and none of
33       its validation tests does. Each rule can then produce some fixes, a
34       warning or an error, and provide hints to help the operator to correct
35       the error.
36
37       Parts of the text can be set as comments and so no rule and no spell
38       check will be performed on them.
39

RULE FILE SYNTAX

SYNTAX RULES

42       list
43
44       A list starts at a `list' statement, and stops at the first `end_list'
45       or at the end of the file.
46
47       Mandatory fields:
48
49       type type
50           until, perform the list until the current line matches `test'
51           while, perform the lint while the current line matches `test'
52           loop, perform the list `test' times
53       test regex / number
54           A regex for `until' and `while' lists. The number of times the list
55           must be performed for `loop', or `0' for infinite loop.
56
57       Optional fields:
58
59       name name
60           Use this to give the list a name.
61
62       spell yes / no
63           Set it to `yes' (default) or `no', if you want or don't want
64           spelling to be checked in the lines matching this list. This value
65           will be inherited by the nested lists.
66
67       Sub-rules:
68
69       list [name]
70       rule [name]
71       comment [name]
72           Followed by the name of the sub-rule or its definition for an
73           anonymous sub-rule.
74
75       rule
76
77       A rule starts at a `rule' statement, and stops at the first `end_rule'
78       or at the beginning of a comment or a list.
79
80       Mandatory fields:
81
82       type type
83           fix, rule provides fixes and hints thought a menu
84           autofix, rule fixes the mistake with no interaction
85           warning, rule issues a warning
86           error, rule issues an error
87           nop, special rule that do nothing, no other field is required
88       regex regex
89           The regex to be match to found this error. Patterns can be captures
90           and then used in the `fix' expression.
91
92       fix expr
93           Provides a correction for the rule, this field can be repeated to
94           provides more than one choice. Only the first one will be used for
95           `autofix' rules.  `warning' and `error' do not provides fixes. The
96           captured patterns can be used here with variables `$1', `$2', and
97           so on.
98
99       hint text
100           Provides some explanations, this will be used as reviewer comments
101           in review mode.
102
103       Optional fields:
104
105       name name
106           Use this to give the rule a name.
107
108       valid [name]
109           Provides a validation test, it can be named or anonymous. For
110           anonymous validation, the test definition must follow.  This field
111           can be repeated more than once, if any of the validation test
112           succeed, the rule does not apply.
113
114       valid
115
116       A validation test starts at a `valid' statement, and stops at the first
117       `end_valid' or at the beginning of a rule, a comment, a list or another
118       validation test.
119
120       Mandatory field:
121
122       pre regex
123       in regex>
124       post regex
125           Try the regex before, in or after the match of the regex rule. At
126           least one of these test must be provided. If all tests are
127           successful, the rule won't apply.
128
129       Optional field:
130
131       name name
132           Use this to give the validation test a name.
133
134       comment
135
136       A comment starts at a `comment' statement, and stops at the first
137       `end_comment' or at the beginning of a rule, a comment or a list.
138
139       Comments are just skipped, no other rule and no spelling are performed
140       on them.
141
142       Mandatory field:
143
144       skip regex
145           A regex matching the text of the comment. Do not use `start' and
146           `stop' with this.
147
148       start regex
149       stop regex
150           Regexs defining the beginning and the end of the comment, all the
151           text between will be considered as comment. Do not use `skip' with
152           this.
153
154       Optional fields:
155
156       name name
157           Use this to give the comment a name.
158
159       start_offset
160       stop_offset
161           Defines where the comment really starts or end. Values are `s' for
162           the place the match starts, `s+<n>' for n characters after the
163           match starts, `e' for the place the match ends, or `e-<n>' for n
164           characters before the match ends. Defaults are `s' for `start'
165           matches and `e' for `stop' matches.
166

SEE ALSO

168       acheck(1), acheck(5)
169

AUTHOR

171       Nicolas Bertolissio <nico.bertol@free.fr>
172
173
174
175perl v5.10.0                      2003-07-20                 ACHECK-RULES.5(8)
Impressum