File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
lkql_checker/doc/gnatcheck_rm Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ GNATcheck rules.
61
61
* :ref: `Explicit_Full_Discrete_Ranges `
62
62
* :ref: `Explicit_Inlining `
63
63
* :ref: `Expression_Functions `
64
+ * :ref: `Final_Package `
64
65
* :ref: `Fixed_Equality_Checks `
65
66
* :ref: `Float_Equality_Checks `
66
67
* :ref: `Forbidden_Aspects `
Original file line number Diff line number Diff line change @@ -2651,6 +2651,31 @@ This rule has the following (optional) parameter for the ``+R`` option:
2651
2651
end Bar;
2652
2652
2653
2653
2654
+ .. _Final_Package :
2655
+
2656
+ ``Final_Package ``
2657
+ ^^^^^^^^^^^^^^^^^
2658
+
2659
+ Check that package declarations annotated as final don't have child
2660
+ packages
2661
+
2662
+ .. note :: We don't do a transitive check, so grandchild packages won't
2663
+ be flagged. We consider this is not necessary, because the child
2664
+ package will be flagged anyway.
2665
+
2666
+ Here is an example:
2667
+
2668
+ .. code-block :: ada
2669
+
2670
+ package Pkg with Annotate => (GNATcheck, Final) is
2671
+ end Pkg;
2672
+
2673
+ package Pkg.Child is -- FLAG
2674
+ end Pkg.Child;
2675
+
2676
+ package Pkg.Child.Grandchild is -- NOFLAG
2677
+ end Pkg.Child.Grandchild;
2678
+
2654
2679
.. _Global_Variables :
2655
2680
2656
2681
``Global_Variables ``
You can’t perform that action at this time.
0 commit comments