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

Semmle/LGTM

bug 1458117

clang-format

Yes

bug 1188202

Formatting C++ Code With clang-format

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

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

Flake8

Yes (with autopep8)

bug 1155970

Flake8

http://flake8.pycqa.org/

black

Yes

bug 1555560

Black

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

pylint

bug 1623024

pylint

https://www.pylint.org/

Python 2/3 compatibility check

bug 1496527

Python 2/3 compatibility check

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

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

YAML linter

https://github.com/adrienverge/yamllint