@@ -287,6 +287,12 @@ The following switches control the general ``gnatcheck`` behavior
287287 All switches and options provided after this flag will be parse as
288288 :ref: `rule options<gnatcheck_Rule_Options> `.
289289
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+
290296If a project file is specified and no argument source is explicitly
291297specified (either directly or by means of ``-files `` option), and no
292298``-U `` or ``--no-subprojects `` is specified, then the set of processed
@@ -384,14 +390,21 @@ LKQL Rule Files
384390===============
385391
386392You 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).
388395
389396By default, GNATcheck will look for a ``rules.lkql `` file in the current working
390397directory or besides the specified project file if any. If there is one and
391398no other rule configuration has been provided (through an LKQL rule file, or
392399through the rule options), GNATcheck will load it as the LKQL rule options
393400file, as if it was provided through the ``--rule-file `` option.
394401
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+
395408This file must be a valid LKQL file that exports at least a ``rules `` top-level
396409symbol. This symbol must refer to an object value containing rules
397410configuration; keys are GNATcheck rules to enable; and values are objects
@@ -405,8 +418,8 @@ integer, a string, or a list of strings.
405418 Forbidden_Attributes: {Forbidden: ["GNAT"], Allowed: ["First", "Last"]}
406419 }
407420
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 :
410423
411424::
412425
@@ -422,8 +435,8 @@ maps to:
422435
423436.. attention ::
424437
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.
427440
428441 ::
429442
@@ -481,8 +494,9 @@ GNATcheck Rule Options
481494
482495.. attention ::
483496
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.
486500
487501The following options control the processing performed by ``gnatcheck ``. You
488502can provide as many rule options as you want after the ``-rules `` switch.
@@ -652,7 +666,7 @@ GNATcheck Exit Codes
652666* ``3 ``: No tool failure, no problem with rule specification, but
653667 there is at least one missing argument source.
654668
655- * ``4 ``: Parameter of the rule `` -from `` option denotes a nonexistent file .
669+ * ``4 ``: Provided rule configuration file doesn't exist .
656670
657671* ``5 ``: The name of an unknown rule in a rule option or some problem with
658672 rule parameters.
0 commit comments