1 ------------------------------------------------------------------------------
4 -- Copyright (C) 2006, Pascal Obry --
6 -- This library is free software; you can redistribute it and/or modify --
7 -- it under the terms of the GNU General Public License as published by --
8 -- the Free Software Foundation; either version 2 of the License, or (at --
9 -- your option) any later version. --
11 -- This library is distributed in the hope that it will be useful, but --
12 -- WITHOUT ANY WARRANTY; without even the implied warranty of --
13 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
14 -- General Public License for more details. --
16 -- You should have received a copy of the GNU General Public License --
17 -- along with this library; if not, write to the Free Software Foundation, --
18 -- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
20 ------------------------------------------------------------------------------
26 Syntax_Error
: exception;
27 -- Raised when a syntax error is found
29 Max_Parameters
: constant := 30;
30 -- Maximum number of parameters that can be specified for a style checker
31 -- for a single language.
33 type Mode
is (Rejected
, Accepted
);
34 type Line_Ending_Style
is (DOS
, UNIX
, MAC
, No
, Any
);
35 -- No means that the line is the last of the file and does not have a line
39 Line_Ending
: Line_Ending_Style
:= UNIX
;
40 -- The line ending style accepted
42 Line_Length_Max
: Positive := 79;
43 -- The maximum line length
45 Duplicate_Blank_Line
: Mode
:= Rejected
;
46 -- If double blank line are accepted or not
48 Trailing_Spaces
: Mode
:= Rejected
;
49 -- Reject any line with trailing blanks (space or HT)
51 Header_Size
: Natural := 20;
52 -- Minimum header size
54 Copyright_Present
: Boolean := False;
55 -- Copyright notice must be present
57 Copyright_Year
: Boolean := True;
58 -- Copyright year must include current year
60 Check_Syntax
: Boolean := True;
61 -- Syntax must be checked
63 Space_Comment
: Natural := 2;
64 -- Number of spaces after a comment tag
66 Checker_Params
: GNAT
.OS_Lib
.Argument_List
(1 .. Max_Parameters
);
67 -- Style checker parameters