rustfmt
|
status: evaluated
|
||||
Rustfmt Verification Report#
Introduction#
Scope and purpose#
Rustfmt is the standard formatting tool for the Rust programming language. It automatically formats Rust code according to style guidelines defined in the Rust community. By using Rustfmt, developers can ensure that their code adheres to a consistent style, improving readability and maintainability across projects. Rustfmt can be integrated into development workflows, including IDEs and continuous integration pipelines, to enforce coding standards automatically.
Inputs and outputs#
Fig. 17 Rustfmt overview#
Available information#
Version: >= 1.8.0
Official repository: rust-lang/rustfmt
Official documentation: https://rust-lang.github.io/rustfmt
Rustfmt configuration in S-CORE module repository: eclipse-score/score#2011
Installation and integration#
Installation#
To be added once https://github.com/eclipse-score/score/issues/2011 is done
Integration#
Integrated in bazel.
Environment#
Requires Rust toolchain and Bazel build environment.
Safety evaluation#
This section outlines the safety evaluation of Rustfmt for its use within the S-CORE project.
Malfunction identification |
Use case description |
Malfunctions |
Impact on safety? |
Impact safety measures available? |
Impact safety detection sufficient? |
Further additional safety measure required? |
Confidence (automatic calculation) |
|---|---|---|---|---|---|---|---|
1 |
Run formatting on source files and does not format according to rules |
The source code is not formatted according to the defined style guidelines, leading to inconsistent code style across the project.
|
no |
no |
yes |
no |
high |
2 |
Run formatting on source files changes code unintentionally |
The source code changes its logical structure or behavior due to incorrect formatting, potentially introducing bugs.
|
yes |
Likelihood: Low. Rustfmt is used in virtually every Rust project. This gives high confidence in its quality.
Also, auto formatting happens only before commiter commits it’s changes, so before compilation (CI), testing(CI) and review.
Countermeasures:
|
yes |
no |
high |
Security evaluation#
This section outlines the security evaluation of Rustfmt for its use within the S-CORE project.
Threat identification |
Use case description |
Threats |
Impact on security? |
Impact security measures available? |
Impact security detection sufficient? |
|---|---|---|---|---|---|
1 |
TBD |
TBD |
TBD |
TBD |
TBD |
Result#
Rustfmt does not require qualification for use in safety-related software development according to ISO 26262.