Просмотр исходного кода

Merge pull request #49 from eolivi/feat_doc_ratio

doc: add doc about ratio.comments in Overview section
Andrey 2 лет назад
Родитель
Сommit
6a7c461b22

+ 5 - 1
docs/docs/01-u-overview.md

@@ -97,12 +97,16 @@ The metrics highlighed in blue are **per file** metrics. The other metrics are *
     <tr class="info center-justified">
     <td>std.code.filelines.comments</td>
     <td>Number of non-blank lines of comments per file.</td>
-    <td rowspan="2"><ul><li>Low number of comments may indicate maintainability problems.</li></ul></td>
+    <td rowspan="3"><ul><li>Low number of comments may indicate maintainability problems.</li></ul></td>
     </tr>
     <tr  class="td-regular center-justified">
     <td>std.code.lines.comments</td>
     <td>Number of non-blank lines of comments per region.</td>
     </tr>
+    <tr  class="td-regular center-justified">
+    <td>std.code.ratio.comments</td>
+    <td>Ratio of non-empty lines of comments to non-empty lines of (code + comments) per region.</td>
+    </tr>
     <tr class="td-regular center-justified">
     <td>std.code.complexity.cyclomatic</td>
     <td>McCabe cyclomatic complexity metric.</td>

+ 1 - 1
metrixpp/ext/std/code/ratio.py

@@ -16,7 +16,7 @@ class Plugin(api.Plugin,
         self.parser = parser
         parser.add_option("--std.code.ratio.comments", "--scrc", action="store_true", default=False,
                          help="Enables collection of comment ratio metric (per region detalization) - "
-                         "ratio of non-empty lines of comments to non-empty lines of (code + comments)"
+                         "ratio of non-empty lines of comments to non-empty lines of (code + comments)."
                          " It uses std.code.lines.code, std.code.lines.comments"
                          " metrics to calculate the ratio."
                          " [default: %default]")

+ 1 - 1
metrixpp/tests/general/test_basic/test_help_collect_default_stdout.gold.txt

@@ -116,7 +116,7 @@ Options:
   --std.code.ratio.comments, --scrc
                         Enables collection of comment ratio metric (per region
                         detalization) - ratio of non-empty lines of comments
-                        to non-empty lines of (code + comments) It uses
+                        to non-empty lines of (code + comments). It uses
                         std.code.lines.code, std.code.lines.comments metrics
                         to calculate the ratio. [default: False]
   --std.code.todo.comments, --sctc