@@ -287,6 +287,12 @@ The following switches control the general ``gnatcheck`` behavior
287
287
All switches and options provided after this flag will be parse as
288
288
:ref: `rule options<gnatcheck_Rule_Options> `.
289
289
290
+ .. attention ::
291
+
292
+ This CLI section is **deprecated **, consider converting your rule
293
+ configuration to the new :ref: `LKQL rule file<LKQL_options_file> ` format
294
+ using the ``--emit-lkql-rule-file `` switch.
295
+
290
296
If a project file is specified and no argument source is explicitly
291
297
specified (either directly or by means of ``-files `` option), and no
292
298
``-U `` or ``--no-subprojects `` is specified, then the set of processed
@@ -384,14 +390,21 @@ LKQL Rule Files
384
390
===============
385
391
386
392
You can configure GNATcheck rules using an LKQL file, provided through the
387
- ``--rule-file `` command-line option.
393
+ ``--rule-file `` command-line option or implicitly fetched by GNATcheck (as
394
+ described in the following paragraph).
388
395
389
396
By default, GNATcheck will look for a ``rules.lkql `` file in the current working
390
397
directory or besides the specified project file if any. If there is one and
391
398
no other rule configuration has been provided (through an LKQL rule file, or
392
399
through the rule options), GNATcheck will load it as the LKQL rule options
393
400
file, as if it was provided through the ``--rule-file `` option.
394
401
402
+ .. note ::
403
+
404
+ You can use the ``--emit-lkql-rule-file `` CLI switch to generate an LKQL rule
405
+ file from a legacy rule configuration provided through the ``-rules ``
406
+ section.
407
+
395
408
This file must be a valid LKQL file that exports at least a ``rules `` top-level
396
409
symbol. This symbol must refer to an object value containing rules
397
410
configuration; keys are GNATcheck rules to enable; and values are objects
@@ -405,8 +418,8 @@ integer, a string, or a list of strings.
405
418
Forbidden_Attributes: {Forbidden: ["GNAT"], Allowed: ["First", "Last"]}
406
419
}
407
420
408
- You can map a boolean parameter from a ``+R `` option to an LKQL rule options file by
409
- passing an LKQL boolean value to it. For example :
421
+ For example, to map a boolean parameter from a ``+R `` rule option to an LKQL
422
+ rule file, you have to associate a boolean LKQL value to the parameter name :
410
423
411
424
::
412
425
@@ -422,8 +435,8 @@ maps to:
422
435
423
436
.. attention ::
424
437
425
- You cannot provide the same key twice; thus, the following code will
426
- result in a runtime error.
438
+ You cannot provide the same key twice; thus, the following code will result
439
+ in a runtime error.
427
440
428
441
::
429
442
@@ -481,8 +494,9 @@ GNATcheck Rule Options
481
494
482
495
.. attention ::
483
496
484
- GNATcheck rule options are deprecated, please use :ref: `LKQL_options_file `
485
- instead.
497
+ Rules options are **deprecated **, consider converting your rule
498
+ configuration to the new :ref: `LKQL rule file<LKQL_options_file> ` format
499
+ using the ``--emit-lkql-rule-file `` CLI switch.
486
500
487
501
The following options control the processing performed by ``gnatcheck ``. You
488
502
can provide as many rule options as you want after the ``-rules `` switch.
@@ -652,7 +666,7 @@ GNATcheck Exit Codes
652
666
* ``3 ``: No tool failure, no problem with rule specification, but
653
667
there is at least one missing argument source.
654
668
655
- * ``4 ``: Parameter of the rule `` -from `` option denotes a nonexistent file .
669
+ * ``4 ``: Provided rule configuration file doesn't exist .
656
670
657
671
* ``5 ``: The name of an unknown rule in a rule option or some problem with
658
672
rule parameters.
0 commit comments