Skip to content

Commit 9ce42a2

Browse files
Luni-4marco-c
andauthored
Update parsed languages and supported metrics in the book (mozilla#1010)
* book: Update parsed languages * book: Update supported metrics --------- Co-authored-by: Marco Castelluccio <[email protected]>
1 parent 8520176 commit 9ce42a2

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

rust-code-analysis-book/src/languages.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ This is the list of programming languages parsed by
44
**rust-code-analysis**.
55

66
- [x] C++
7-
- [ ] C#
8-
- [ ] CSS
9-
- [ ] Go
10-
- [ ] HTML
11-
- [ ] Java
7+
- [x] Java
128
- [x] JavaScript
139
- [x] The JavaScript used in Firefox internal
10+
- [ ] Kotlin
1411
- [x] Python
1512
- [x] Rust
1613
- [x] Typescript
1714

18-
A check indicates which languages have metrics implemented.
15+
A check indicates which languages have metrics implemented.
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
# Supported Metrics
22

3-
**rust-code-analysis** implements a series of metrics
4-
- **CC**: it calculates the code complexity examining the
3+
**rust-code-analysis** implements a series of metrics:
4+
5+
- **ABC**: it measures the size of a source code by counting the number of
6+
Assignments (`A`), Branches (`B`) and Conditions (`C`).
7+
- **BLANK**: it counts the number of blank lines in a source file.
8+
- **CC**: it calculates the _Cyclomatic complexity_ examining the
59
control flow of a program.
6-
- **SLOC**: it counts the number of lines in a source file.
7-
- **PLOC**: it counts the number of physical lines (instructions) contained in
8-
a source file.
9-
- **LLOC**: it counts the number of logical lines (statements) contained in
10-
a source file.
1110
- **CLOC**: it counts the number of comments in a source file.
12-
- **BLANK**: it counts the number of blank lines in a source file.
11+
- **COGNITIVE**: it calculates the _Cognitive complexity_, measuring how complex
12+
it is to understand a unit of code.
1313
- **HALSTEAD**: it is a suite that provides a series of information, such as the
1414
effort required to maintain the analyzed code, the size in bits to store the
1515
program, the difficulty to understand the code, an estimate of the number of
1616
bugs present in the codebase, and an estimate of the time needed to
1717
implement the software.
18+
- **LLOC**: it counts the number of logical lines (statements) contained in a
19+
source file.
1820
- **MI**: it is a suite that allows to evaluate the maintainability of a software.
19-
- **NOM**: it counts the number of functions and closures in a file/trait/class.
20-
- **NEXITS**: it counts the number of possible exit points from a method/function.
2121
- **NARGS**: it counts the number of arguments of a function/method.
22-
23-
The metrics above are still **NOT** implemented for C#, CSS, Go, HTML, and Java
24-
languages.
22+
- **NEXITS**: it counts the number of possible exit points from a method/function.
23+
- **NOM**: it counts the number of functions and closures in a file/trait/class.
24+
- **NPA**: it counts the number of public attributes in classes/interfaces.
25+
- **NPM**: it counts the number of public methods in classes/interfaces.
26+
- **PLOC**: it counts the number of physical lines (instructions) contained in
27+
a source file.
28+
- **SLOC**: it counts the number of lines in a source file.
29+
- **WMC**: it sums the _Cyclomatic complexity_ of every method defined in a class.

0 commit comments

Comments
 (0)