2 <!-- This file adds support for the style_checker utility to GPS. -->
5 <action name="Style_Checker" output="none" category="Style_Checker">
6 <description>Check source code style.</description>
8 <shell>MDI.save_all</shell>
9 <shell>Locations.remove_category "Style Checker"</shell>
10 <!-- <shell>Project %p</shell> -->
11 <!-- Use the above to have a per-project configuration -->
12 <shell>Project.root</shell>
13 <shell>Project.get_tool_switches_as_string %1 Style_Checker</shell>
14 <external output="">style_checker %1 "%F"</external>
16 <shell>Locations.parse "%1 " "Style Checker"</shell>
22 <menu action="Style_Checker" before="Unit Testing" >
23 <title>Check for style errors</title>
27 <tool name="Style_Checker" package="Style_Checker" index="Style_Checker" >
28 <language>Ada</language>
30 <title line="1" >Simple switches</title>
31 <title line="2" >Line ending</title>
32 <title line="3" >Copyright</title>
35 <check label="Allow trailing spaces"
36 switch="-T" line="1"/>
38 <check label="Allow duplicate blank lines"
39 switch="-B" line="1"/>
41 <check label="Allow single space after comment characters"
42 switch="-C" line="1"/>
44 <check label="Forbid single comment line ending with dot"
45 switch="-d" line="1"/>
47 <check label="Disable Ada syntax check"
48 switch="-S" line="1"/>
50 <spin label="Maximum line length" min="50" max="120" default="79"
53 <check label="Do not check for header size"
54 switch="-H" line="1"/>
56 <spin label="Header size" min="0" max="40" default="20"
59 <dependency master-page="Style_Checker" slave-page="Style_Checker"
62 master-status="on" slave-status="20" />
64 <dependency master-page="Style_Checker" slave-page="Style_Checker"
67 master-status="21" slave-status="off" />
69 <dependency master-page="Style_Checker" slave-page="Style_Checker"
72 master-status="19" slave-status="off" />
76 <radio-entry label="Do not check line ending" switch="-E" />
77 <radio-entry label="DOS line ending" switch="-eDOS" />
78 <radio-entry label="UNIX line ending" switch="-eUNIX" />
82 <check label="Check for copyright presence"
83 switch="-cp" line="3"/>
85 <check label="Check for copyright year"
86 switch="-cy" line="3"/>
88 <field label="Copyright pattern" switch="-cf"
89 separator=" " line="3"/>