Code quality

Because Firefox is a complex piece of software, a lot of tools are executed to identify issues at development phase. In this document, we try to list these all tools.

C/C++

Tools

Has autofixes

Meta bug

More info

Upstream

Custom clang checker

Source

Clang-Tidy

Yes

bug 712350

Static analysis

https://clang.llvm.org/extra/clang-tidy/checks/list.html

Clang analyzer

bug 712350

https://clang-analyzer.llvm.org/

cpp virtual final

cpp virtual final

clang-format

Yes

bug 1188202

Formatting C++ Code With clang-format

https://clang.llvm.org/docs/ClangFormat.html

CSS

Tools

Has autofixes

Meta bug

More info

Upstream

Stylelint

Yes

bug 1762027

Stylelint

https://stylelint.io/

Mozilla Stylelint

Mozilla Stylelint Plugin

JavaScript

Tools

Has autofixes

Meta bug

More info

Upstream

Eslint

Yes

bug 1229856

ESLint

https://eslint.org/

Mozilla ESLint

bug 1229856

Mozilla ESLint Plugin

Prettier

Yes

bug 1558517

JavaScript Coding style

https://prettier.io/

Python

Tools

Has autofixes

Meta bug

More info

Upstream

ruff

Yes

bug 1811850

Ruff

https://github.com/charliermarsh/ruff

black

Yes

bug 1555560

Black

https://black.readthedocs.io/en/stable

Rust

Tools

Has autofixes

Meta bug

More info

Upstream

Rustfmt

Yes

bug 1454764

Rustfmt

https://github.com/rust-lang/rustfmt

Clippy

bug 1361342

clippy

https://github.com/rust-lang/rust-clippy

Java/Kotlin

Tools

Has autofixes

Meta bug

More info

Upstream

Spotless

Yes

bug 1571899

Spotless

https://github.com/diffplug/spotless

Others

Tools

Has autofixes

Meta bug

More info

Upstream

shellcheck

https://www.shellcheck.net/

rstchecker

RST Linter

https://github.com/myint/rstcheck

Typo detection

Yes

Codespell

https://github.com/codespell-project/codespell

Fluent Lint

No

Fluent Lint

YAML linter

No

yamllint

https://github.com/adrienverge/yamllint