Skip to content

Commit

Permalink
In the docs, generate subsections for "rust-code-analysis" (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 authored Jul 6, 2020
1 parent 95b6e53 commit 90d0c6a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 63 deletions.
42 changes: 0 additions & 42 deletions rust-code-analysis-book/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<a href="https://github.com/mozilla/rust-code-analysis/issues/" target="_blank">GitHub Issue Tracker</a>.

## 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,
Expand Down
2 changes: 2 additions & 0 deletions rust-code-analysis-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
21 changes: 0 additions & 21 deletions rust-code-analysis-book/src/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions rust-code-analysis-book/src/languages.md
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions rust-code-analysis-book/src/metrics.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 90d0c6a

Please sign in to comment.