Fix check for copyright presence in multi-line comments.
[style_checker.git] / regtests / pck.ads
blobea67fd948ebc7a5e8152333d39a032f2b20e8bae
1 ------------------------------------------------------------------------------
2 -- Style Checker --
3 -- --
4 -- Copyright (C) 2006, Pascal Obry --
5 -- --
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. --
10 -- --
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. --
15 -- --
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. --
19 -- --
20 ------------------------------------------------------------------------------
22 with Ada.Strings.Unbounded;
23 with GNAT.OS_Lib;
25 package Pck is
27 use Ada.Strings.Unbounded;
29 Syntax_Error : exception;
30 -- Raised when a syntax error is found...
32 Max_Parameters : constant := 30;
33 -- Maximum number of parameters that can be specified for a style checker
34 -- for a single language.
36 type Mode is (Rejected, Accepted);
37 type Line_Ending_Style is (DOS, UNIX, MAC, No, Any);
38 -- No means that the line is the last of the file and does not have a line
39 -- terminator.
41 type Data is record
42 Line_Ending : Line_Ending_Style := UNIX;
43 -- The line ending style accepted.
45 Line_Length_Max : Positive := 79;
46 -- The maximum line length
48 Duplicate_Blank_Line : Mode := Rejected;
49 -- If double blank line are accepted or not
51 Trailing_Spaces : Mode := Rejected;
52 -- Reject any line with trailing blanks (space or HT)
54 Header_Size : Natural := 20;
55 -- Minimum header size
57 Copyright_Present : Boolean := False;
58 -- Copyright notice must be present
60 Copyright_Year : Boolean := True;
61 -- Copyright year must include current year
63 Copyright_Pattern : Unbounded_String;
64 -- Copyright line must match the given regexp pattern
66 Check_Syntax : Boolean := True;
67 -- Syntax must be checked.
69 Space_Comment : Natural := 2;
70 -- Number of spaces after a comment tag.
71 -- Test me.
73 Checker_Params : GNAT.OS_Lib.Argument_List (1 .. Max_Parameters);
74 -- Style checker parameters
76 Comment_Dot_EOL : Boolean := True;
77 -- Single line comment can terminate with a dot.
79 Index : Natural := 0;
80 end record;
82 end Pck;