Skip to content

Commit

Permalink
Add a 'How to cite rust-code-analysis' section in the repo's README a…
Browse files Browse the repository at this point in the history
…nd the docs main page (#557)
  • Loading branch information
marco-c authored Mar 17, 2021
1 parent 5795114 commit de31206
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 8 deletions.
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,62 @@
</a>

**rust-code-analysis** is a Rust library to analyze and extract information
from source codes written in many different programming languages.
from source code written in many different programming languages.
It is based on a parser generator tool and an incremental parsing library
called
<a href="https://tree-sitter.github.io/tree-sitter/" target="_blank">Tree Sitter</a>.


In addition, we provide a command line tool called **rust-code-analysis-cli**
to interact with the API of the library in an easy way.
A command line tool called **rust-code-analysis-cli** is provided to interact with the API of the library in an easy way.

This tool can be used to:

- Call **rust-code-analysis** API
- Print nodes and metrics information
- Export metrics in different formats

# Software Usability
In addition, we provide a **rust-code-analysis-web** tool to use the library through a REST API.


# Usage

**rust-code-analysis** supports many types of programming languages and
computes a great variety of metrics. If you want to discover more on this
software, read our
computes a great variety of metrics. You can find up to date documentation at
<a href="https://mozilla.github.io/rust-code-analysis/index.html" target="_blank">Documentation</a>.

On the
<a href="https://mozilla.github.io/rust-code-analysis/commands/index.html" target="_blank">
Commands
</a> page, you will learn which commands need to be run to get information
</a> page, there is a list of commands that can be run to get information
about metrics, nodes, and other general data provided by this software.


# Contributing

If you want to contribute to the development of this software
or you are just interested in building **rust-code-analysis**, have a look at the
<a href="https://mozilla.github.io/rust-code-analysis/developers/index.html" target="_blank">Developers Guide</a>.


# How to cite rust-code-analysis

```
@article{ARDITO2020100635,
title = {rust-code-analysis: A Rust library to analyze and extract maintainability information from source codes},
journal = {SoftwareX},
volume = {12},
pages = {100635},
year = {2020},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2020.100635},
url = {https://www.sciencedirect.com/science/article/pii/S2352711020303484},
author = {Luca Ardito and Luca Barbato and Marco Castelluccio and Riccardo Coppola and Calixte Denizet and Sylvestre Ledru and Michele Valsesia},
keywords = {Algorithm, Software metrics, Software maintainability, Software quality},
abstract = {The literature proposes many software metrics for evaluating the source code non-functional properties, such as its complexity and maintainability. The literature also proposes several tools to compute those properties on source codes developed with many different software languages. However, the Rust language emergence has not been paired by the community’s effort in developing parsers and tools able to compute metrics for the Rust source code. Also, metrics tools often fall short in providing immediate means of comparing maintainability metrics between different algorithms or coding languages. We hence introduce rust-code-analysis, a Rust library that allows the extraction of a set of eleven maintainability metrics for ten different languages, including Rust. rust-code-analysis, through the Abstract Syntax Tree (AST) of a source file, allows the inspection of the code structure, analyzing source code metrics at different levels of granularity, and finding code syntax errors before compiling time. The tool also offers a command-line interface that allows exporting the results in different formats. The possibility of analyzing source codes written in different programming languages enables simple and systematic comparisons between the metrics produced from different empirical and large-scale analysis sources.}
}
```


# Licenses

- Mozilla-defined grammars are released under the MIT license.
Expand Down
24 changes: 23 additions & 1 deletion rust-code-analysis-book/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,29 @@ If you prefer to use **rust-code-analysis** as a crate, you can find the
`API docs` generated by `Rustdoc`
<a href="https://docs.rs/rust-code-analysis/*/rust_code_analysis/" target="_blank">here</a>.


## How to cite rust-code-analysis

```
@article{ARDITO2020100635,
title = {rust-code-analysis: A Rust library to analyze and extract maintainability information from source codes},
journal = {SoftwareX},
volume = {12},
pages = {100635},
year = {2020},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2020.100635},
url = {https://www.sciencedirect.com/science/article/pii/S2352711020303484},
author = {Luca Ardito and Luca Barbato and Marco Castelluccio and Riccardo Coppola and Calixte Denizet and Sylvestre Ledru and Michele Valsesia},
keywords = {Algorithm, Software metrics, Software maintainability, Software quality},
abstract = {The literature proposes many software metrics for evaluating the source code non-functional properties, such as its complexity and maintainability. The literature also proposes several tools to compute those properties on source codes developed with many different software languages. However, the Rust language emergence has not been paired by the community’s effort in developing parsers and tools able to compute metrics for the Rust source code. Also, metrics tools often fall short in providing immediate means of comparing maintainability metrics between different algorithms or coding languages. We hence introduce rust-code-analysis, a Rust library that allows the extraction of a set of eleven maintainability metrics for ten different languages, including Rust. rust-code-analysis, through the Abstract Syntax Tree (AST) of a source file, allows the inspection of the code structure, analyzing source code metrics at different levels of granularity, and finding code syntax errors before compiling time. The tool also offers a command-line interface that allows exporting the results in different formats. The possibility of analyzing source codes written in different programming languages enables simple and systematic comparisons between the metrics produced from different empirical and large-scale analysis sources.}
}
```

## License

All the source code of **rust-code-analysis** is released under the
- Mozilla-defined grammars are released under the MIT license.

- **rust-code-analysis**, **rust-code-analysis-cli** and **rust-code-analysis-web**
are released under the
<a href="https://www.mozilla.org/MPL/2.0/" target="_blank">Mozilla Public License v2.0</a>.

0 comments on commit de31206

Please sign in to comment.