File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -1219,9 +1219,7 @@ package body Gnatcheck.Diagnoses is
1219
1219
end if ;
1220
1220
1221
1221
-- Traverse exemption section chain
1222
- while Section /= null
1223
- and then For_Line <= Section.Exemption_Section.Line_End
1224
- loop
1222
+ while Section /= null loop
1225
1223
if For_Line in
1226
1224
Section.Exemption_Section.Line_Start ..
1227
1225
Section.Exemption_Section.Line_End
Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ procedure Main is
30
30
procedure Poo (A : Integer) is null ; -- ## rule line off implicit_in ## justify line off -- FLAG in valid exemptions
31
31
32
32
-- Check that there is a warning for "rule line on"
33
- procedure Poo (A : Integer) is null ; -- ## rule line on implicit_in -- FLAG (2)
33
+ procedure Roo (A : Integer) is null ; -- ## rule line on implicit_in -- FLAG (2)
34
+
35
+ -- Check that exempting with a comment after exempting with a pragma is working as expected
36
+ -- ## rule off implicit_in ## Because
37
+ procedure Zoo (A : Integer) is null ; -- FLAG
38
+ -- ## rule on implicit_in
39
+
40
+ pragma Annotate (Gnatcheck, Exempt_On, " implicit_in" , " Because" );
41
+ procedure Woo (A : Integer) is null ; -- FLAG
42
+ pragma Annotate (Gnatcheck, Exempt_Off, " implicit_in" );
34
43
begin
35
44
null ;
36
45
end Main ;
Original file line number Diff line number Diff line change 10
10
non-exempted violations : 3
11
11
rule exemption warnings : 5
12
12
compilation errors : 0
13
- exempted violations : 5
13
+ exempted violations : 7
14
14
internal errors : 0
15
15
16
16
2. Exempted Coding Standard Violations
@@ -25,6 +25,10 @@ main.adb:30:19: implicit IN mode in parameter specification
25
25
(justify line off -- FLAG in valid exemptions)
26
26
main.adb:33:19: implicit IN mode in parameter specification
27
27
(unjustified)
28
+ main.adb:37:19: implicit IN mode in parameter specification
29
+ (Because)
30
+ main.adb:41:19: implicit IN mode in parameter specification
31
+ (Because)
28
32
29
33
3. Non-exempted Coding Standard Violations
30
34
You can’t perform that action at this time.
0 commit comments