Skip to content

Commit c6d61ef

Browse files
committed
Merge branch 'topic/520' into 'master'
lowercase_keywords checker: fix documentation Closes #520 See merge request eng/libadalang/langkit-query-language!504
2 parents a802de5 + 24b9703 commit c6d61ef

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

lkql_checker/doc/generated/predefined_rules.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5971,12 +5971,15 @@ the definition of exemption sections are:
59715971
.. index:: Lowercase_Keywords
59725972

59735973
Flag Ada keywords that are not purely lowercase, such as ``BEGIN`` or
5974-
``beGin``.
5974+
``beGin``. The rule is language version sensitive.
59755975

5976-
Please note that this check is **not** language version sensitive. Every
5977-
keyword from Ada 83 to Ada 2012 will be flagged. This means that this
5978-
check might give false positives on usage of identifiers that are
5979-
keywords in newer versions of Ada.
5976+
The rule has an optional parameter for the ``+R`` option and for LKQL rule
5977+
options files:
5978+
5979+
*Language_Version: string*
5980+
The version of the language on which to run the checker (supported
5981+
versions are Ada_83, Ada_95, Ada_2005, Ada_2012, and, Ada_2022 which
5982+
is also the default).
59805983

59815984
.. rubric:: Example
59825985

lkql_checker/share/lkql/lowercase_keywords.lkql

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ val match_uppercase = pattern("[A-Z]+")
2727
@unit_check(category="Style", subcategory="Readability")
2828
fun lowercase_keywords(unit, language_version="ada_2022") =
2929
|" Flag Ada keywords that are not purely lowercase, such as ``BEGIN`` or
30-
|" ``beGin``.
30+
|" ``beGin``. The rule is language version sensitive.
3131
|"
32-
|" Please note that this check is **not** language version sensitive. Every
33-
|" keyword from Ada 83 to Ada 2012 will be flagged. This means that this
34-
|" check might give false positives on usage of identifiers that are
35-
|" keywords in newer versions of Ada.
32+
|" The rule has an optional parameter for the ``+R`` option and for LKQL rule
33+
|" options files:
34+
|"
35+
|" *Language_Version: string*
36+
|" The version of the language on which to run the checker (supported
37+
|" versions are Ada_83, Ada_95, Ada_2005, Ada_2012, and, Ada_2022 which
38+
|" is also the default).
3639
|"
3740
|" .. rubric:: Example
3841
|"

0 commit comments

Comments
 (0)