[GRASS-QA] GRASS QA: martinl | ./grass6/lib/gis/parser.c |no clones | 3 monsters | 4 warnings

grass-qa at proxy.soccerlab.polymtl.ca grass-qa at proxy.soccerlab.polymtl.ca
Fri Sep 7 09:07:35 EDT 2007



Hello martinl,

here a report on your recent GRASS-CVS change:

ANALYSIS

your changes to files/functions:


lib/gis/parser.c functions


G_disable_interactive (Begins at: 162 Ends at: 183)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      22 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_flag (Begins at: 186 Ends at: 244)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      59 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_option (Begins at: 247 Ends at: 329)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      83 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_define_standard_option (Begins at: 332 Ends at: 611)
--------------+---------+-------+---------+
Complexity:   |      32 |    ** | Warning |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      37 |     * |         |
LOC:          |     280 |   *** | MONSTER |
--------------+---------+-------+---------+
1 metric are OUT OF RANGE!

G_define_module (Begins at: 614 Ends at: 666)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       1 |       |      OK |
LOC:          |      53 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_parser (Begins at: 668 Ends at: 937)
--------------+---------+-------+---------+
Complexity:   |      38 |   *** | MONSTER |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      78 |    ** | Warning |
LOC:          |     270 |    ** | Warning |
--------------+---------+-------+---------+
1 metric are OUT OF RANGE!

uses_new_gisprompt (Begins at: 940 Ends at: 990)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      51 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_usage (Begins at: 992 Ends at: 1178)
--------------+---------+-------+---------+
Complexity:   |      33 |    ** | Warning |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      53 |     * |         |
LOC:          |     187 |     * |         |
--------------+---------+-------+---------+
at least 1 values are close to an outlier please consider revising code

print_escaped_for_xml (Begins at: 1180 Ends at: 1196)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      17 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

print_escaped_for_html (Begins at: 1203 Ends at: 1214)
--------------+---------+-------+---------+
Complexity:   |       7 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      12 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_usage_xml (Begins at: 1217 Ends at: 1431)
--------------+---------+-------+---------+
Complexity:   |      28 |    ** | Warning |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      71 |    ** | Warning |
LOC:          |     215 |    ** | Warning |
--------------+---------+-------+---------+
at least 3 values are close to an outlier please consider revising code

G_usage_html (Begins at: 1433 Ends at: 1658)
--------------+---------+-------+---------+
Complexity:   |      42 |   *** | MONSTER |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      85 |    ** | Warning |
LOC:          |     226 |    ** | Warning |
--------------+---------+-------+---------+
1 metric are OUT OF RANGE!

G_script (Begins at: 1660 Ends at: 1771)
--------------+---------+-------+---------+
Complexity:   |      22 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      46 |     * |         |
LOC:          |     112 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

generate_tcl (Begins at: 1773 Ends at: 1868)
--------------+---------+-------+---------+
Complexity:   |      10 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      45 |     * |         |
LOC:          |      96 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_gui_tcltk (Begins at: 1871 Ends at: 1900)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       8 |       |      OK |
LOC:          |      30 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_gui_wx (Begins at: 1903 Ends at: 1914)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      12 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_gui (Begins at: 1917 Ends at: 1925)
--------------+---------+-------+---------+
Complexity:   |       2 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_tcltk (Begins at: 1928 Ends at: 1943)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      16 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

show_options (Begins at: 1945 Ends at: 1975)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      31 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

show (Begins at: 1977 Ends at: 1990)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      14 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

set_flag (Begins at: 1992 Ends at: 2019)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

contains (Begins at: 2024 Ends at: 2033)
--------------+---------+-------+---------+
Complexity:   |       3 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      10 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

set_option (Begins at: 2035 Ends at: 2095)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      13 |       |      OK |
LOC:          |      61 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_opts (Begins at: 2097 Ends at: 2134)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       3 |       |      OK |
LOC:          |      38 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_an_opt (Begins at: 2136 Ends at: 2178)
--------------+---------+-------+---------+
Complexity:   |      10 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |      13 |       |      OK |
LOC:          |      43 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_int (Begins at: 2180 Ends at: 2246)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      67 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_double (Begins at: 2248 Ends at: 2288)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      41 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_string (Begins at: 2290 Ends at: 2317)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |       6 |       |      OK |
LOC:          |      28 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_required (Begins at: 2319 Ends at: 2342)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       2 |       |      OK |
LOC:          |      24 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

split_opts (Begins at: 2344 Ends at: 2407)
--------------+---------+-------+---------+
Complexity:   |       8 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      64 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_multiple_opts (Begins at: 2409 Ends at: 2447)
--------------+---------+-------+---------+
Complexity:   |       6 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       5 |       |      OK |
LOC:          |      39 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

check_overwrite (Begins at: 2450 Ends at: 2506)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      11 |       |      OK |
LOC:          |      57 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive (Begins at: 2508 Ends at: 2536)
--------------+---------+-------+---------+
Complexity:   |       5 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |      29 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive_flag (Begins at: 2538 Ends at: 2546)
--------------+---------+-------+---------+
Complexity:   |       1 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |       4 |       |      OK |
LOC:          |       9 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

interactive_option (Begins at: 2548 Ends at: 2638)
--------------+---------+-------+---------+
Complexity:   |      23 |     * |         |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      41 |     * |         |
LOC:          |      91 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

split_gisprompt (Begins at: 2640 Ends at: 2670)
--------------+---------+-------+---------+
Complexity:   |       4 |       |      OK |
ParamNBR:     |       4 |       |      OK |
CalledNBR:    |       0 |       |      OK |
LOC:          |      31 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

gis_prompt (Begins at: 2672 Ends at: 2729)
--------------+---------+-------+---------+
Complexity:   |      11 |       |      OK |
ParamNBR:     |       2 |       |      OK |
CalledNBR:    |      20 |       |      OK |
LOC:          |      58 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

G_recreate_command (Begins at: 2731 Ends at: 2833)
--------------+---------+-------+---------+
Complexity:   |      13 |       |      OK |
ParamNBR:     |       1 |       |      OK |
CalledNBR:    |      25 |       |      OK |
LOC:          |     103 |       |      OK |
--------------+---------+-------+---------+
metrics are OK

Clone analysis:

This file does not contain  cloned functions

__________________________________________

Threshold GRASS6 key metrics values at 2007-09-07 are:
---------------------------+-----------+---------+
                    median | upper     | outlier |
                           | quartile  | limit   |
---------------------------+-----------+---------+
Complexity (Cyclo):      5 |        25 |      37 |
ParamNBR:                2 |         6 |       9 |
CalledNBR:              10 |        60 |      88 |
LOC:                    43 |       195 |     273 |
---------------------------+-----------+---------+

Measures (see below Web page for details):
 Complexity (Cyclo): a complexity index
 ParamNBR: number of passed parameters
 CalledNBR: number of called functions
 LOC: Lines Of Code

Message interpretation:
 OK : Nothing to say at all
 *  : above 75 % of value warning
 ** : this is getting close to be out of range, consider revising the code
 ***: this is a monster, definitely you should revise this function


__________________________________________
Brought to you by:
SOftware Cost-effective Change and Evolution Research (SOCCER) laboratory
http://web.soccerlab.polymtl.ca/grass-evolution/grass-browsers/grass-index-en.html




More information about the grass-qa mailing list