From e9e28b77afd9d99e49a48f9c5648ed65721c15a3 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Fri, 3 Jul 2020 12:33:09 +0200 Subject: [PATCH] Improve documentation --- rust-code-analysis-book/src/README.md | 42 ------------------- rust-code-analysis-book/src/SUMMARY.md | 2 + .../src/commands/README.md | 21 ---------- rust-code-analysis-book/src/languages.md | 16 +++++++ rust-code-analysis-book/src/metrics.md | 24 +++++++++++ 5 files changed, 42 insertions(+), 63 deletions(-) create mode 100644 rust-code-analysis-book/src/languages.md create mode 100644 rust-code-analysis-book/src/metrics.md diff --git a/rust-code-analysis-book/src/README.md b/rust-code-analysis-book/src/README.md index 04c77249a..3e26fd25c 100644 --- a/rust-code-analysis-book/src/README.md +++ b/rust-code-analysis-book/src/README.md @@ -11,48 +11,6 @@ You can find the source code of this software on while issues and feature requests can be posted on the respective GitHub Issue Tracker. -## Supported Languages - -Below you can find the list of programming languages parsed by -**rust-code-analysis**. - -* C++ -* C# -* CSS -* Go -* HTML -* Java -* JavaScript -* The JavaScript used in Firefox internal -* Python -* Rust -* Typescript - -## Supported Metrics - -**rust-code-analysis** implements a series of metrics -- **CC**: it calculates the code complexity examining the - control flow of a program. -- **SLOC**: it counts the number of lines in a source file. -- **PLOC**: it counts the number of physical lines (instructions) contained in - a source file. -- **LLOC**: it counts the number of logical lines (statements) contained in - a source file. -- **CLOC**: it counts the number of comments in a source file. -- **BLANK**: it counts the number of blank lines in a source file. -- **HALSTEAD**: it is a suite that provides a series of information, such as the - effort required to maintain the analyzed code, the size in bits to store the - program, the difficulty to understand the code, an estimate of the number of - bugs present in the codebase, and an estimate of the time needed to - implement the software. -- **MI**: it is a suite that allows to evaluate the maintainability of a software. -- **NOM**: it counts the number of functions and closures in a file/trait/class. -- **NEXITS**: it counts the number of possible exit points from a method/function. -- **NARGS**: it counts the number of arguments of a function/method. - -The metrics above are still **NOT** implemented for C#, CSS, Go, HTML, and Java -languages. - ## Supported platforms **rust-code-analysis** can run on the most common platforms: Linux, macOS, diff --git a/rust-code-analysis-book/src/SUMMARY.md b/rust-code-analysis-book/src/SUMMARY.md index 40d5869ef..6e77c70ff 100644 --- a/rust-code-analysis-book/src/SUMMARY.md +++ b/rust-code-analysis-book/src/SUMMARY.md @@ -1,6 +1,8 @@ # Summary - [rust-code-analysis](./README.md) + - [Supported Languages](./languages.md) + - [Supported Metrics](./metrics.md) - [Commands](commands/README.md) - [Metrics](commands/metrics.md) - [Nodes](commands/nodes.md) diff --git a/rust-code-analysis-book/src/commands/README.md b/rust-code-analysis-book/src/commands/README.md index fcd42af30..85c62c4db 100644 --- a/rust-code-analysis-book/src/commands/README.md +++ b/rust-code-analysis-book/src/commands/README.md @@ -19,27 +19,6 @@ Metrics are a series of measures that can be used to: **rust-code-analysis** calculates the metrics starting from the source code of a program. These kind of metrics are called *static metrics*. -The list of metrics supported right now are the following ones: - -- **CC**: it calculates the code complexity examining the - control flow of a program. -- **SLOC**: it counts the number of lines in a source file. -- **PLOC**: it counts the number of physical lines (instructions) contained in - a source file. -- **LLOC**: it counts the number of logical lines (statements) contained in - a source file. -- **CLOC**: it counts the number of comments in a source file. -- **BLANK**: it counts the number of blank lines in a source file. -- **HALSTEAD**: it is a suite that provides a series of information, such as the - effort required to maintain the analyzed code, the size in bits to store the - program, the difficulty to understand the code, an estimate of the number of - bugs present in the codebase, and an estimate of the time needed to - implement the software. -- **MI**: it is a suite that allows to evaluate the maintainability of a software. -- **NOM**: it counts the number of functions and closures in a file/trait/class. -- **NEXITS**: it counts the number of possible exit points from a method/function. -- **NARGS**: it counts the number of arguments of a function/method. - ## Nodes To represent the structure of program code, **rust-code-analysis-cli** builds diff --git a/rust-code-analysis-book/src/languages.md b/rust-code-analysis-book/src/languages.md new file mode 100644 index 000000000..7e194d3b9 --- /dev/null +++ b/rust-code-analysis-book/src/languages.md @@ -0,0 +1,16 @@ +# Supported Languages + +This is the list of programming languages parsed by +**rust-code-analysis**. + +* C++ +* C# +* CSS +* Go +* HTML +* Java +* JavaScript +* The JavaScript used in Firefox internal +* Python +* Rust +* Typescript diff --git a/rust-code-analysis-book/src/metrics.md b/rust-code-analysis-book/src/metrics.md new file mode 100644 index 000000000..cacdc9c9b --- /dev/null +++ b/rust-code-analysis-book/src/metrics.md @@ -0,0 +1,24 @@ +# Supported Metrics + +**rust-code-analysis** implements a series of metrics +- **CC**: it calculates the code complexity examining the + control flow of a program. +- **SLOC**: it counts the number of lines in a source file. +- **PLOC**: it counts the number of physical lines (instructions) contained in + a source file. +- **LLOC**: it counts the number of logical lines (statements) contained in + a source file. +- **CLOC**: it counts the number of comments in a source file. +- **BLANK**: it counts the number of blank lines in a source file. +- **HALSTEAD**: it is a suite that provides a series of information, such as the + effort required to maintain the analyzed code, the size in bits to store the + program, the difficulty to understand the code, an estimate of the number of + bugs present in the codebase, and an estimate of the time needed to + implement the software. +- **MI**: it is a suite that allows to evaluate the maintainability of a software. +- **NOM**: it counts the number of functions and closures in a file/trait/class. +- **NEXITS**: it counts the number of possible exit points from a method/function. +- **NARGS**: it counts the number of arguments of a function/method. + +The metrics above are still **NOT** implemented for C#, CSS, Go, HTML, and Java +languages.