-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/warnings_as_errors' into 'master'
Add the "-W/--warnings-as-errors" flag to GNATcheck Closes #232 See merge request eng/libadalang/langkit-query-language!328
- Loading branch information
Showing
14 changed files
with
227 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
testsuite/tests/gnatcheck/rules_depreciation_message/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gnatcheck: The '-rules' section is now deprecated. You should only use the '--rule' and '--rule-file' command-line options. | ||
gnatcheck: You can use the '--emit-lkql-rule-file' flag to automatically translate your rule configuration to the new LKQL format. | ||
The '-rules' section is now deprecated. You should only use the '--rule' and '--rule-file' command-line options. | ||
You can use the '--emit-lkql-rule-file' flag to automatically translate your rule configuration to the new LKQL format. | ||
main.adb:3:04: goto statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
procedure Main is | ||
begin | ||
goto lbl; -- FLAG (2) | ||
<<lbl>> | ||
end Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
val rules = @{ | ||
goto_statements, | ||
restrictions: {arg: ["No_Recursion"]} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Without "warnings as errors" | ||
============================ | ||
|
||
gnatcheck: restriction No_Recursion ignored (cannot be checked statically), use rule Recursive_Subprograms instead | ||
main.adb:3:04: goto statement | ||
|
||
With "warnings as errors" | ||
========================= | ||
|
||
gnatcheck: restriction No_Recursion ignored (cannot be checked statically), use rule Recursive_Subprograms instead | ||
main.adb:3:04: goto statement | ||
>>>program returned status code 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
driver: gnatcheck | ||
format: brief | ||
input_sources: | ||
- main.adb | ||
lkql_rule_file: rules.lkql | ||
tests: | ||
- label: Without "warnings as errors" | ||
- label: With "warnings as errors" | ||
extra_args: | ||
- -W |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters