Marina Konstantinova 4 years ago
parent
commit
d034a79893

+ 1 - 1
docs/README.md

@@ -1,6 +1,6 @@
 # Website
 # Website
 
 
-This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
+This website is built using [Docusaurus 2](https://v2.docusaurus.io/).
 
 
 ### Installation
 ### Installation
 
 

+ 18 - 18
docs/docs/01-m-overview.md

@@ -55,7 +55,7 @@ The metrics highlighed in blue are **per file** metrics. The other metrics are *
     </tr>
     </tr>
 </thead>
 </thead>
 <tbody>
 <tbody>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.general.size</td>
     <td>std.general.size</td>
     <td>Size of a file in bytes.</td>
     <td>Size of a file in bytes.</td>
     <td rowspan="6"><ul><li>Monitoring the growth of source code base.</li>
     <td rowspan="6"><ul><li>Monitoring the growth of source code base.</li>
@@ -64,79 +64,79 @@ The metrics highlighed in blue are **per file** metrics. The other metrics are *
         <li>Predicting delivery dates by comparing S-shaped code base growth / change curves.</li></ul>
         <li>Predicting delivery dates by comparing S-shaped code base growth / change curves.</li></ul>
     </td>
     </td>
     </tr>
     </tr>
-    <tr  class="td-regular">
+    <tr  class="td-regular center-justified">
     <td>std.code.length.total</td>
     <td>std.code.length.total</td>
     <td>The same as 'std.general.size' metric, but attributed to code regions.</td>
     <td>The same as 'std.general.size' metric, but attributed to code regions.</td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.code.filelines.total</td>
     <td>std.code.filelines.total</td>
     <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.) per file</td>
     <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.) per file</td>
     </tr>
     </tr>
-    <tr  class="td-regular">
+    <tr  class="td-regular center-justified">
     <td>std.code.lines.total</td>
     <td>std.code.lines.total</td>
     <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.) per region</td>
     <td>Number of non-blank lines of code of any content type (exectuable, comments, etc.) per region</td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.code.filelines.code</td>
     <td>std.code.filelines.code</td>
     <td>Number of non-blank lines of code excluding preprocessor and comments per file.</td>
     <td>Number of non-blank lines of code excluding preprocessor and comments per file.</td>
     </tr>
     </tr>
-    <tr  class="td-regular">
+    <tr  class="td-regular center-justified">
     <td>std.code.lines.code</td>
     <td>std.code.lines.code</td>
     <td>Number of non-blank lines of code excluding preprocessor and comments per region.</td>
     <td>Number of non-blank lines of code excluding preprocessor and comments per region.</td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.code.filelines.preprocessor</td>
     <td>std.code.filelines.preprocessor</td>
     <td>Number of non-blank lines of preprocessor code per file.</td>
     <td>Number of non-blank lines of preprocessor code per file.</td>
     <td rowspan="2"><ul><li>Enforcing localisation of preprocessor code in a single place.</li>
     <td rowspan="2"><ul><li>Enforcing localisation of preprocessor code in a single place.</li>
         <li>Encouraging usage of safer code structures instead of the preprocessor.</li></ul></td>
         <li>Encouraging usage of safer code structures instead of the preprocessor.</li></ul></td>
     </tr>
     </tr>
-    <tr  class="td-regular">
+    <tr  class="td-regular center-justified">
     <td>std.code.lines.preprocessor</td>
     <td>std.code.lines.preprocessor</td>
     <td>Number of non-blank lines of preprocessor code per region.</td>
     <td>Number of non-blank lines of preprocessor code per region.</td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.code.filelines.comments</td>
     <td>std.code.filelines.comments</td>
     <td>Number of non-blank lines of comments per file.</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="2"><ul><li>Low number of comments may indicate maintainability problems.</li></ul></td>
     </tr>
     </tr>
-    <tr  class="td-regular">
+    <tr  class="td-regular center-justified">
     <td>std.code.lines.comments</td>
     <td>std.code.lines.comments</td>
     <td>Number of non-blank lines of comments per region.</td>
     <td>Number of non-blank lines of comments per region.</td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.code.complexity.cyclomatic</td>
     <td>std.code.complexity.cyclomatic</td>
     <td>McCabe cyclomatic complexity metric.</td>
     <td>McCabe cyclomatic complexity metric.</td>
     <td colspan="2"><ul><li>Identification of highly complex code for review and refactoring.</li>
     <td colspan="2"><ul><li>Identification of highly complex code for review and refactoring.</li>
         <li>Preventing complex functions (complexity is a reason of many defects and a reason of expensive maintaintenance).</li></ul></td>
         <li>Preventing complex functions (complexity is a reason of many defects and a reason of expensive maintaintenance).</li></ul></td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.code.complexity.maxindent</td>
     <td>std.code.complexity.maxindent</td>
     <td>Maximum level of indentation of blocks within a region.
     <td>Maximum level of indentation of blocks within a region.
         <pre class="prettyprint">
         <pre class="prettyprint">
         </pre>
         </pre>
         </td>
         </td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.code.magic.numbers</td>
     <td>std.code.magic.numbers</td>
     <td>Number of magic numbers. There is an option to exclude 0, -1 and 1 numbers from counting.</td>
     <td>Number of magic numbers. There is an option to exclude 0, -1 and 1 numbers from counting.</td>
     <td>Magic numbers are dangerous.
     <td>Magic numbers are dangerous.
         The <a href="http://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad" target="blank">
         The <a href="http://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad" target="blank">
             discussion on stackoverflow</a> explains why.</td>
             discussion on stackoverflow</a> explains why.</td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.code.todo.comments, std.code.todo.strings</td>
     <td>std.code.todo.comments, std.code.todo.strings</td>
     <td>Number of TODO/FIXME/etc markers in comments and strings accordingly.
     <td>Number of TODO/FIXME/etc markers in comments and strings accordingly.
         There is an option to configure a list of markers.</td>
         There is an option to configure a list of markers.</td>
     <td>Manage potentially incomplete work. If project manager dispatches issues only in a tracker tool,
     <td>Manage potentially incomplete work. If project manager dispatches issues only in a tracker tool,
         todo markers are lost in the source code. The metric could make these 'lost' issues visible.</td>
         todo markers are lost in the source code. The metric could make these 'lost' issues visible.</td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.general.proctime</td>
     <td>std.general.proctime</td>
     <td>Seconds spent on processing a file.</td>
     <td>Seconds spent on processing a file.</td>
     <td><ul><li>Monitor and profile Metrix++ tool's performance.</li></ul>
     <td><ul><li>Monitor and profile Metrix++ tool's performance.</li></ul>
     </td>
     </td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.suppress</td>
     <td>std.suppress</td>
     <td>An option enables collection of Metrix++ suppressions and 2 metrics: 'std.suppress:count' and
     <td>An option enables collection of Metrix++ suppressions and 2 metrics: 'std.suppress:count' and
         'std.suppress.file:count'. The first is number of suppressions per region.
         'std.suppress.file:count'. The first is number of suppressions per region.
@@ -146,14 +146,14 @@ The metrics highlighed in blue are **per file** metrics. The other metrics are *
             but there could be exceptions in specific cases. Managing suppressions is about managing exceptions.
             but there could be exceptions in specific cases. Managing suppressions is about managing exceptions.
             If there are many exceptional cases, maybe something is wrong with a metric or the application of a metric.</li></ul></td>
             If there are many exceptional cases, maybe something is wrong with a metric or the application of a metric.</li></ul></td>
     </tr>
     </tr>
-    <tr class="info">
+    <tr class="info center-justified">
     <td>std.general.procerrors</td>
     <td>std.general.procerrors</td>
     <td>Number of errors detected by Metrix++ code parser.</td>
     <td>Number of errors detected by Metrix++ code parser.</td>
     <td><ul><li>Cleaning up errors to ensure reliable code scanning.</li>
     <td><ul><li>Cleaning up errors to ensure reliable code scanning.</li>
         <li>Errors, like mismatched brackets, may result in bad identification of regions.</li>
         <li>Errors, like mismatched brackets, may result in bad identification of regions.</li>
     </ul></td>
     </ul></td>
     </tr>
     </tr>
-    <tr class="td-regular">
+    <tr class="td-regular center-justified">
     <td>std.code.maintindex.simple</td>
     <td>std.code.maintindex.simple</td>
     <td>Simple variant of maintainability index - a measure of maintainability.
     <td>Simple variant of maintainability index - a measure of maintainability.
         It uses std.code.lines:code and std.code.complexity:cyclomatic
         It uses std.code.lines:code and std.code.complexity:cyclomatic

+ 3 - 3
docs/docs/02-m-download-install.md

@@ -11,11 +11,11 @@ In order to checkout the latest development version from the [version control sy
 > git clone https://github.com/metrixplusplus/metrixplusplus metrixplusplus
 > git clone https://github.com/metrixplusplus/metrixplusplus metrixplusplus
 ```
 ```
 
 
-### Change and Release Notes
+#### Change and Release Notes
 Change and release notes are available [here](https://github.com/metrixplusplus/metrixplusplus/blob/master/CHANGELOG.md).
 Change and release notes are available [here](https://github.com/metrixplusplus/metrixplusplus/blob/master/CHANGELOG.md).
 
 
-### Prerequisites
+#### Prerequisites
 Python Runtime Environment (version 2.8.x or 3.x)
 Python Runtime Environment (version 2.8.x or 3.x)
 
 
-### License
+#### License
 [MIT license](https://github.com/metrixplusplus/metrixplusplus/blob/master/LICENSE)
 [MIT license](https://github.com/metrixplusplus/metrixplusplus/blob/master/LICENSE)

+ 3 - 3
docs/docs/03-m-getting-started.md

@@ -7,19 +7,19 @@ sidebar_label: Getting started
 The tool is relatively simple to use. There are 3 fundamental steps:
 The tool is relatively simple to use. There are 3 fundamental steps:
 
 
 * Collect the data, for example:
 * Collect the data, for example:
-```
+```bash
 > python "/path/to/metrix++.py" collect --std.code.lines.code --std.code.complexity.cyclomatic
 > python "/path/to/metrix++.py" collect --std.code.lines.code --std.code.complexity.cyclomatic
 ```
 ```
 
 
 
 
 * View the data, for example:
 * View the data, for example:
-```
+```bash
 > python "/path/to/metrix++.py" view
 > python "/path/to/metrix++.py" view
 ```
 ```
 
 
 
 
 * Apply thresholds, for example:
 * Apply thresholds, for example:
-```
+```bash
 > python "/path/to/metrix++.py" limit --max-limit=std.code.complexity:cyclomatic:7
 > python "/path/to/metrix++.py" limit --max-limit=std.code.complexity:cyclomatic:7
 ```
 ```
 
 

File diff suppressed because it is too large
+ 18 - 19
docs/docs/04-m-workflow.md


File diff suppressed because it is too large
+ 195 - 19
docs/docs/05-m-extending-tool.md


+ 33 - 23
docs/docusaurus.config.js

@@ -1,16 +1,15 @@
 module.exports = {
 module.exports = {
   title: 'Metrix++',
   title: 'Metrix++',
   tagline: 'Management of source code quality is possible',
   tagline: 'Management of source code quality is possible',
-  url: 'https://your-docusaurus-test-site.com',
+  url: 'https://metrixplusplus.github.io/',
   baseUrl: '/',
   baseUrl: '/',
   favicon: 'img/favicon.ico',
   favicon: 'img/favicon.ico',
-  organizationName: 'facebook', // Usually your GitHub org/user name.
-  projectName: 'docusaurus', // Usually your repo name.
+  projectName: 'metrixplusplus', // Usually your repo name.
   themeConfig: {
   themeConfig: {
     navbar: {
     navbar: {
       title: 'Metrix++',
       title: 'Metrix++',
       logo: {
       logo: {
-        alt: 'Metrix++ Logo',
+        alt: 'Metrix++',
         src: 'img/logo.svg',
         src: 'img/logo.svg',
       },
       },
       links: [
       links: [
@@ -22,7 +21,7 @@ module.exports = {
         },
         },
         {to: 'blog', label: 'Blog', position: 'left'},
         {to: 'blog', label: 'Blog', position: 'left'},
         {
         {
-          href: 'https://github.com/facebook/docusaurus',
+          href: 'https://github.com/metrixplusplus/metrixplusplus',
           label: 'GitHub',
           label: 'GitHub',
           position: 'right',
           position: 'right',
         },
         },
@@ -35,34 +34,43 @@ module.exports = {
           title: 'Docs',
           title: 'Docs',
           items: [
           items: [
             {
             {
-              label: 'Overview',
+              label: 'Users Manual',
               to: 'docs/01-m-overview',
               to: 'docs/01-m-overview',
             },
             },
             {
             {
-              label: 'Download and install',
-              to: 'docs/02-download-install',
+              label: 'Developers Manual',
+              to: 'docs/01-d-file',
             },
             },
+          ],
+        },
+        {
+          title: 'Community',
+          items: [
             {
             {
-              label: 'Metrics',
-              to: 'docs/03-metrics',
+              label: 'Ask question',
+              href: 'https://github.com/metrixplusplus/metrixplusplus/issues/new',
+            },
+            {
+              label: 'Report defect',
+              href: 'https://github.com/metrixplusplus/metrixplusplus/issues/new',
             },
             },
           ],
           ],
         },
         },
         {
         {
-          title: 'Community',
+          title: 'Extentions',
           items: [
           items: [
             {
             {
-              label: 'Stack Overflow',
-              href: 'https://stackoverflow.com/questions/tagged/docusaurus',
+              label: 'Feature request',
+              href: 'https://github.com/metrixplusplus/metrixplusplus/issues/new',
+            },
+            {
+              label: 'Open issues',
+              href: 'https://github.com/metrixplusplus/metrixplusplus/issues',
             },
             },
             {
             {
-              label: 'Discord',
-              href: 'https://discordapp.com/invite/docusaurus',
+              label: 'Changelog',
+              href: 'https://github.com/metrixplusplus/metrixplusplus/blob/master/CHANGELOG.md',
             },
             },
-           // {
-           //   label: 'Twitter',
-           //   href: 'https://twitter.com/docusaurus',
-           // },
           ],
           ],
         },
         },
         {
         {
@@ -74,12 +82,14 @@ module.exports = {
             },
             },
             {
             {
               label: 'GitHub',
               label: 'GitHub',
-              href: 'https://github.com/facebook/docusaurus',
+              href: 'https://github.com/metrixplusplus/',
             },
             },
           ],
           ],
         },
         },
       ],
       ],
-      copyright: `Copyright © ${new Date().getFullYear()} Metrix++.`,
+      copyright: `Copyright © 2009 - ${new Date().getFullYear()}, Metrix++ Project.`,
+      license: `Code licensed under MIT license, documentation under CC BY 3.0.`,
+      
     },
     },
   },
   },
   presets: [
   presets: [
@@ -92,13 +102,13 @@ module.exports = {
           sidebarPath: require.resolve('./sidebars.js'),
           sidebarPath: require.resolve('./sidebars.js'),
           // Please change this to your repo.
           // Please change this to your repo.
           editUrl:
           editUrl:
-            'https://github.com/facebook/docusaurus/edit/master/website/',
+            'https://metrixplusplus.github.io/',
         },
         },
         blog: {
         blog: {
           showReadingTime: true,
           showReadingTime: true,
           // Please change this to your repo.
           // Please change this to your repo.
           editUrl:
           editUrl:
-            'https://github.com/facebook/docusaurus/edit/master/website/blog/',
+            'https://metrixplusplus.github.io/',
         },
         },
         theme: {
         theme: {
           customCss: require.resolve('./src/css/custom.css'),
           customCss: require.resolve('./src/css/custom.css'),

+ 4 - 1
docs/src/css/custom.css

@@ -29,4 +29,7 @@
 }
 }
 .td-regular{
 .td-regular{
   background-color: #FFFFFF !important;
   background-color: #FFFFFF !important;
-}
+}
+.center-justified {
+  text-align: justify;
+}