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
12191219 end if ;
12201220
12211221 -- 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
12251223 if For_Line in
12261224 Section.Exemption_Section.Line_Start ..
12271225 Section.Exemption_Section.Line_End
Original file line number Diff line number Diff line change @@ -30,7 +30,16 @@ procedure Main is
3030 procedure Poo (A : Integer) is null ; -- ## rule line off implicit_in ## justify line off -- FLAG in valid exemptions
3131
3232 -- 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" );
3443begin
3544 null ;
3645end Main ;
Original file line number Diff line number Diff line change 1010 non-exempted violations : 3
1111 rule exemption warnings : 5
1212 compilation errors : 0
13- exempted violations : 5
13+ exempted violations : 7
1414 internal errors : 0
1515
16162. Exempted Coding Standard Violations
@@ -25,6 +25,10 @@ main.adb:30:19: implicit IN mode in parameter specification
2525 (justify line off -- FLAG in valid exemptions)
2626main.adb:33:19: implicit IN mode in parameter specification
2727 (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)
2832
29333. Non-exempted Coding Standard Violations
3034
You can’t perform that action at this time.
0 commit comments