Skip to content

Commit 6ce303c

Browse files
committed
Merge branch 'topic/exemption_messages' into 'master'
Correct exemption related messages which contain the "rule" word See merge request eng/libadalang/langkit-query-language!295
2 parents f6aba5c + 5214ed3 commit 6ce303c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lkql_checker/src/gnatcheck-diagnoses.adb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,7 +2560,7 @@ package body Gnatcheck.Diagnoses is
25602560
To_String (Next_Postponed_Section
25612561
.Exemption_Section
25622562
.Exempted_Name) &
2563-
" rule in exemption section starting at line" &
2563+
" in exemption section starting at line" &
25642564
Next_Postponed_Section.Exemption_Section.Line_Start'Img,
25652565
Diagnosis_Kind => Exemption_Warning,
25662566
SF => SF);
@@ -2598,7 +2598,7 @@ package body Gnatcheck.Diagnoses is
25982598
(Next_Par_S_Info.Exempt_Info.Exempted_Name) &
25992599
": " & Params_Img
26002600
(Next_Par_S_Info.Params, Next_Par_S_Info.Rule) &
2601-
"' rule in exemption section starting " & "at line" &
2601+
"' in exemption section starting at line" &
26022602
Next_Par_S_Info.Exempt_Info.Line_Start'Img,
26032603
Diagnosis_Kind => Exemption_Warning,
26042604
SF => SF);
@@ -2730,7 +2730,7 @@ package body Gnatcheck.Diagnoses is
27302730
Store_Diagnosis
27312731
(Text => File_Name (SF) & ":" & SLOC &
27322732
": parameter " & Param &
2733-
" duplicated in rule exemption",
2733+
" duplicated in exemption",
27342734
Diagnosis_Kind => Exemption_Warning,
27352735
SF => SF);
27362736
end if;

testsuite/tests/gnatcheck/exemptions/comment_annotations_check/test.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ main.adb:20:16: expression function
3535
4. Rule exemption problems
3636

3737
c.adb:1:01: no matching 'exempt_OFF' annotation for Goto_Statements
38-
c.adb:6:07: no detection for Goto_Statements rule in exemption section starting at line 1
38+
c.adb:6:07: no detection for Goto_Statements in exemption section starting at line 1
3939
main.adb:24:07: no matching 'exempt_OFF' annotation for expression_functions
4040
main.adb:29:04: rule expression_functions is already exempted at line 24
4141
main.adb:33:41: State should be "off" for line exemption

testsuite/tests/gnatcheck/exemptions/instance_exemptions/test.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ main.adb:27:04: wrong rule or instance name in exemption (Not_Existant), ignored
6363
main.adb:29:04: cannot exempt a specific instance of a compiler rule (style_checks), ignored
6464
main.adb:59:04: rule goto_statements is already exempted at line 58
6565
main.adb:60:04: rule goto_statements is already exempted at line 58
66-
main.adb:61:65: no detection for Goto_Statements rule in exemption section starting at line 58
66+
main.adb:61:65: no detection for Goto_Statements in exemption section starting at line 58
6767
main.adb:65:04: instance GOTO is already exempted at line 63
68-
main.adb:66:58: no detection for Goto_Statements rule in exemption section starting at line 64
69-
main.adb:67:58: no detection for GOTO rule in exemption section starting at line 63
68+
main.adb:66:58: no detection for Goto_Statements in exemption section starting at line 64
69+
main.adb:67:58: no detection for GOTO in exemption section starting at line 63
7070
main.adb:71:04: rule Style_Checks is already exempted with parameter(s) at line 69
7171
main.adb:72:04: rule Style_Checks is already exempted with parameter 'x' at line 69
7272
main.adb:73:04: rule Style_Checks is already exempted with the same parameter(s) at line 69

testsuite/tests/gnatcheck/exemptions/restriction_exemptions/test.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ main.adb:20:18: reference to "Ada.Text_IO.Put_Line" violates restriction No_Use_
2424

2525
4. Rule exemption problems
2626

27-
main.adb:22:106: no detection for 'Restrictions: Max_Protected_Entries, No_Access_Subprograms' rule in exemption section starting at line 17
27+
main.adb:22:106: no detection for 'Restrictions: Max_Protected_Entries, No_Access_Subprograms' in exemption section starting at line 17
2828

2929
5. Language violations
3030

0 commit comments

Comments
 (0)