rust_code_analysis/lib.rs
1//! rust-code-analysis is a library to analyze and extract information
2//! from source codes written in many different programming languages.
3//!
4//! You can find the source code of this software on
5//! <a href="https://github.com/mozilla/rust-code-analysis/" target="_blank">GitHub</a>,
6//! while issues and feature requests can be posted on the respective
7//! <a href="https://github.com/mozilla/rust-code-analysis/issues/" target="_blank">GitHub Issue Tracker</a>.
8//!
9//! ## Supported Languages
10//!
11//! - C++
12//! - C#
13//! - CSS
14//! - Go
15//! - HTML
16//! - Java
17//! - JavaScript
18//! - The JavaScript used in Firefox internal
19//! - Python
20//! - Rust
21//! - Typescript
22//!
23//! ## Supported Metrics
24//!
25//! - CC: it calculates the code complexity examining the
26//! control flow of a program.
27//! - SLOC: it counts the number of lines in a source file.
28//! - PLOC: it counts the number of physical lines (instructions)
29//! contained in a source file.
30//! - LLOC: it counts the number of logical lines (statements)
31//! contained in a source file.
32//! - CLOC: it counts the number of comments in a source file.
33//! - BLANK: it counts the number of blank lines in a source file.
34//! - HALSTEAD: it is a suite that provides a series of information,
35//! such as the effort required to maintain the analyzed code,
36//! the size in bits to store the program, the difficulty to understand
37//! the code, an estimate of the number of bugs present in the codebase,
38//! and an estimate of the time needed to implement the software.
39//! - MI: it is a suite that allows to evaluate the maintainability
40//! of a software.
41//! - NOM: it counts the number of functions and closures
42//! in a file/trait/class.
43//! - NEXITS: it counts the number of possible exit points
44//! from a method/function.
45//! - NARGS: it counts the number of arguments of a function/method.
46
47#![allow(clippy::upper_case_acronyms)]
48
49#[macro_use]
50mod asttools;
51mod c_langs_macros;
52mod c_macro;
53#[macro_use]
54mod macros;
55mod getter;
56
57mod alterator;
58pub(crate) use alterator::*;
59
60mod node;
61pub use crate::node::*;
62
63mod metrics;
64pub use metrics::*;
65
66mod languages;
67pub(crate) use languages::*;
68
69mod checker;
70pub(crate) use checker::*;
71
72mod output;
73pub use output::*;
74
75mod spaces;
76pub use crate::spaces::*;
77
78mod ops;
79pub use crate::ops::*;
80
81mod find;
82pub use crate::find::*;
83
84mod function;
85pub use crate::function::*;
86
87mod ast;
88pub use crate::ast::*;
89
90mod count;
91pub use crate::count::*;
92
93mod preproc;
94pub use crate::preproc::*;
95
96mod langs;
97pub use crate::langs::*;
98
99mod tools;
100pub use crate::tools::*;
101
102mod concurrent_files;
103pub use crate::concurrent_files::*;
104
105mod traits;
106pub use crate::traits::*;
107
108mod parser;
109pub use crate::parser::*;
110
111mod comment_rm;
112pub use crate::comment_rm::*;