Skip to content

Commit

Permalink
Merge branch 'topic/exemption_rule_name' into 'master'
Browse files Browse the repository at this point in the history
Correct the regular expression matching rule names in annotation pragmas

Closes #328

See merge request eng/libadalang/langkit-query-language!287
  • Loading branch information
HugoGGuerrier committed Sep 3, 2024
2 parents 9d96c92 + b0a6598 commit 51e93de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lkql_checker/doc/gnatcheck_rm/using_gnatcheck.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,12 @@ to simplify mapping your coding standard requirements onto
...
bar.ads:17:3: this is not good [My_Coding_Rule_N|Gnatcheck_Rule_N]

.. attention::

A custom coding rule name can be any sequence of non-whitespace characters.
Moreover, the ":" (colon) character is forbidden in those names for parsing
purposes.

.. _gnatcheck_Exit_Codes:

GNATcheck Exit Codes
Expand Down
2 changes: 1 addition & 1 deletion lkql_checker/src/gnatcheck-diagnoses.adb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ package body Gnatcheck.Diagnoses is
-- Matcher for a diagnostic

Match_Rule_Name : constant Pattern_Matcher :=
Compile ("^""(\w+)\s*(?::\s*(.*))?""$");
Compile ("^""([^\s:]+)\s*(?::\s*(.*))?""$");
-- Matcher for a rule name and potential arguments

Match_Rule_Param : constant Pattern_Matcher :=
Expand Down

0 comments on commit 51e93de

Please sign in to comment.