From d41f5c1facb17bd231fe4dbc122d105585281487 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 19 Aug 2019 08:36:02 +0000 Subject: [PATCH] [Ada] Document missing gnatmetric switches 2019-08-19 Bob Duff gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Document missing metrics switches. From-SVN: r274646 --- gcc/ada/ChangeLog | 5 ++ .../doc/gnat_ugn/gnat_utility_programs.rst | 57 ++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a2e90375360..f0595781118 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-08-19 Bob Duff + + * doc/gnat_ugn/gnat_utility_programs.rst: Document missing + metrics switches. + 2019-08-19 Piotr Trojanek * sem_ch12.adb (Get_Unit_Instantiation_Node): Simplify Nkind_In diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst index db0a82ec4e1..56d48695a2e 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst @@ -2107,6 +2107,14 @@ Alternatively, you may run the script using the following command line: task bodies, entry bodies and statement sequences in package bodies. + :switch:`--lines-spark` + Report the number of lines written in SPARK. + + + :switch:`--no-lines-spark` + Do not report the number of lines written in SPARK. + + .. _Syntax_Metrics_Control: Syntax Metrics Control @@ -2293,6 +2301,53 @@ Alternatively, you may run the script using the following command line: Do not report the number of subprogram parameters + .. _Contract_Metrics_Control: + + Contract Metrics Control + ^^^^^^^^^^^^^^^^^^^^^^^^ + + .. index:: Contract metrics control in gnatmetric + + :switch:`--contract-all` + Report all the contract metrics + + + :switch:`--no-contract-all` + Do not report any of the contract metrics + + + :switch:`--contract` + Report the number of public subprograms with contracts + + + :switch:`--no-contract` + Do not report the number of public subprograms with contracts + + + :switch:`--post` + Report the number of public subprograms with postconditions + + + :switch:`--no-post` + Do not report the number of public subprograms with postconditions + + + :switch:`--contract-complete` + Report the number of public subprograms with complete contracts + + + :switch:`--no-contract-complete` + Do not report the number of public subprograms with complete contracts + + + :switch:`--contract-all` + Report the McCabe complexity of public subprograms + + + :switch:`--no-contract-all` + Do not report the McCabe complexity of public subprograms + + .. _Complexity_Metrics_Control: Complexity Metrics Control @@ -2384,7 +2439,7 @@ Alternatively, you may run the script using the following command line: :switch:`--no-complexity-all` - Do not report any of complexity metrics + Do not report any of the complexity metrics :switch:`--complexity-cyclomatic`