.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "ACHECK-RULES.5 5" .TH ACHECK-RULES.5 5 "2016-01-19" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" set.rules \- Rules set for acheck .SH "DESCRIPTION" .IX Header "DESCRIPTION" Rules set files contain rules to be check by acheck. .PP Lines beginning with a number sign (`\fB#\fR') and empty lines will be ignored. Spaces at the beginning and the end of a line will also be ignored as well as tabulators. If you need spaces at the end or the beginning of a value you can use apostrophes (`\fB"\fR'). A comment starts with the number sign, there can be any number of spaces and/or tab stops in front of the #. Long lines can be broken into multiple lines ending with a backslash (`\fB\e\fR'). Some possible examples: .PP .Vb 6 \& # this line is ignored \& field value \& field value # this is a comment \& field "value ending with space " \& field value\e \& continuing on the next line .Ve .PP You have to escape number signs with a backslash to use it in a value and use apostrophes if a value ends with a backslash. .PP Rule sets are made of lists of rules. Theses lists can be repeated a number of times, until or while a condition happens. .PP A rule detects an error if the corresponding test succeeds and none of its validation tests does. Each rule can then produce some fixes, a warning or an error, and provide hints to help the operator to correct the error. .PP Parts of the text can be set as comments and so no rule and no spell check will be performed on them. .SH "RULE FILE SYNTAX" .IX Header "RULE FILE SYNTAX" .SH "SYNTAX RULES" .IX Header "SYNTAX RULES" .SS "list" .IX Subsection "list" A list starts at a `\fIlist\fR' statement, and stops at the first `\fIend_list\fR' or at the end of the file. .PP Mandatory fields: .IP "\fItype\fR type" 4 .IX Item "type type" .RS 4 .PD 0 .IP "\fIuntil\fR, perform the list until the current line matches `\fItest\fR'" 4 .IX Item "until, perform the list until the current line matches `test'" .IP "\fIwhile\fR, perform the lint while the current line matches `\fItest\fR'" 4 .IX Item "while, perform the lint while the current line matches `test'" .IP "\fIloop\fR, perform the list `\fItest\fR' times" 4 .IX Item "loop, perform the list `test' times" .RE .RS 4 .RE .IP "\fItest\fR regex / number" 4 .IX Item "test regex / number" .PD A regex for `\fIuntil\fR' and `\fIwhile\fR' lists. The number of times the list must be performed for `\fIloop\fR', or `\fI0\fR' for infinite loop. .PP Optional fields: .IP "\fIname\fR name" 4 .IX Item "name name" Use this to give the list a name. .IP "\fIspell\fR yes / no" 4 .IX Item "spell yes / no" Set it to `\fIyes\fR' (default) or `\fIno\fR', if you want or don't want spelling to be checked in the lines matching this list. This value will be inherited by the nested lists. .PP Sub-rules: .IP "\fIlist\fR [name]" 4 .IX Item "list [name]" .PD 0 .IP "\fIrule\fR [name]" 4 .IX Item "rule [name]" .IP "\fIcomment\fR [name]" 4 .IX Item "comment [name]" .PD Followed by the name of the sub-rule or its definition for an anonymous sub-rule. .SS "rule" .IX Subsection "rule" A rule starts at a `\fIrule\fR' statement, and stops at the first `\fIend_rule\fR' or at the beginning of a comment or a list. .PP Mandatory fields: .IP "\fItype\fR type" 4 .IX Item "type type" .RS 4 .PD 0 .IP "\fIfix\fR, rule provides fixes and hints thought a menu" 4 .IX Item "fix, rule provides fixes and hints thought a menu" .IP "\fIautofix\fR, rule fixes the mistake with no interaction" 4 .IX Item "autofix, rule fixes the mistake with no interaction" .IP "\fIwarning\fR, rule issues a warning" 4 .IX Item "warning, rule issues a warning" .IP "\fIerror\fR, rule issues an error" 4 .IX Item "error, rule issues an error" .IP "\fInop\fR, special rule that do nothing, no other field is required" 4 .IX Item "nop, special rule that do nothing, no other field is required" .RE .RS 4 .RE .IP "\fIregex\fR regex" 4 .IX Item "regex regex" .PD The regex to be match to found this error. Patterns can be captures and then used in the `\fIfix\fR' expression. .IP "\fIfix\fR expr" 4 .IX Item "fix expr" Provides a correction for the rule, this field can be repeated to provides more than one choice. Only the first one will be used for `\fIautofix\fR' rules. `\fIwarning\fR' and `\fIerror\fR' do not provides fixes. The captured patterns can be used here with variables `\fI\f(CI$1\fI\fR', `\fI\f(CI$2\fI\fR', and so on. .IP "\fIhint\fR text" 4 .IX Item "hint text" Provides some explanations, this will be used as reviewer comments in review mode. .PP Optional fields: .IP "\fIname\fR name" 4 .IX Item "name name" Use this to give the rule a name. .IP "\fIvalid\fR [name]" 4 .IX Item "valid [name]" Provides a validation test, it can be named or anonymous. For anonymous validation, the test definition must follow. This field can be repeated more than once, if any of the validation test succeed, the rule does not apply. .SS "valid" .IX Subsection "valid" A validation test starts at a `\fIvalid\fR' statement, and stops at the first `\fIend_valid\fR' or at the beginning of a rule, a comment, a list or another validation test. .PP Mandatory field: .IP "\fIpre\fR regex" 4 .IX Item "pre regex" .PD 0 .IP "\fIin\fR regex>" 4 .IX Item "in regex>" .IP "\fIpost\fR regex" 4 .IX Item "post regex" .PD Try the regex before, in or after the match of the regex rule. At least one of these test must be provided. If all tests are successful, the rule won't apply. .PP Optional field: .IP "\fIname\fR name" 4 .IX Item "name name" Use this to give the validation test a name. .SS "comment" .IX Subsection "comment" A comment starts at a `\fIcomment\fR' statement, and stops at the first `\fIend_comment\fR' or at the beginning of a rule, a comment or a list. .PP Comments are just skipped, no other rule and no spelling are performed on them. .PP Mandatory field: .IP "\fIskip\fR regex" 4 .IX Item "skip regex" A regex matching the text of the comment. Do not use `\fIstart\fR' and `\fIstop\fR' with this. .IP "\fIstart\fR regex" 4 .IX Item "start regex" .PD 0 .IP "\fIstop\fR regex" 4 .IX Item "stop regex" .PD Regexs defining the beginning and the end of the comment, all the text between will be considered as comment. Do not use `\fIskip\fR' with this. .PP Optional fields: .IP "\fIname\fR name" 4 .IX Item "name name" Use this to give the comment a name. .IP "\fIstart_offset\fR" 4 .IX Item "start_offset" .PD 0 .IP "\fIstop_offset\fR" 4 .IX Item "stop_offset" .PD Defines where the comment really starts or end. Values are `\fIs\fR' for the place the match starts, `\fIs+\fR' for \fIn\fR characters after the match starts, `\fIe\fR' for the place the match ends, or `\fIe\-\fR' for \fIn\fR characters before the match ends. Defaults are `\fIs\fR' for `\fIstart\fR' matches and `\fIe\fR' for `\fIstop\fR' matches. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIacheck\fR\|(1), \fIacheck\fR\|(5) .SH "AUTHOR" .IX Header "AUTHOR" Nicolas Bertolissio