2020-02-11 12:11:44 +03:00
|
|
|
Code quality
|
|
|
|
============
|
2020-01-02 19:55:33 +03:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2020-02-11 12:11:44 +03:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
:glob:
|
|
|
|
|
|
|
|
static-analysis.rst
|
|
|
|
lint/index.rst
|
|
|
|
coding-style/index.rst
|
|
|
|
|
2020-01-02 19:55:33 +03:00
|
|
|
.. list-table:: C/C++
|
|
|
|
:header-rows: 1
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-01-02 19:55:33 +03:00
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-01-02 19:55:33 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Custom clang checker
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
- `Source <https://searchfox.org/mozilla-central/source/build/clang-plugin>`_
|
|
|
|
-
|
|
|
|
* - Clang-Tidy
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 712350 <https://bugzilla.mozilla.org/show_bug.cgi?id=712350>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`Static analysis <Mach static analysis>`
|
|
|
|
- https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
|
|
|
* - Clang analyzer
|
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 712350 <https://bugzilla.mozilla.org/show_bug.cgi?id=712350>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
- https://clang-analyzer.llvm.org/
|
|
|
|
* - Coverity
|
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1230156 <https://bugzilla.mozilla.org/show_bug.cgi?id=1230156>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
-
|
|
|
|
* - cpp virtual final
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
- :ref:`cpp virtual final`
|
|
|
|
-
|
|
|
|
* - Semmle/LGTM
|
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1458117 <https://bugzilla.mozilla.org/show_bug.cgi?id=1458117>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
-
|
|
|
|
* - clang-format
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1188202 <https://bugzilla.mozilla.org/show_bug.cgi?id=1188202>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`Formatting C++ Code With clang-format`
|
|
|
|
- https://clang.llvm.org/docs/ClangFormat.html
|
|
|
|
|
|
|
|
.. list-table:: JavaScript
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-01-02 19:55:33 +03:00
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-01-02 19:55:33 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Eslint
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1229856 <https://bugzilla.mozilla.org/show_bug.cgi?id=1229856>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`ESLint`
|
|
|
|
- https://eslint.org/
|
|
|
|
* - Mozilla ESLint
|
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1229856 <https://bugzilla.mozilla.org/show_bug.cgi?id=1229856>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`Mozilla ESLint Plugin`
|
|
|
|
-
|
|
|
|
* - Prettier
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1558517 <https://bugzilla.mozilla.org/show_bug.cgi?id=1558517>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`JavaScript Coding style`
|
|
|
|
- https://prettier.io/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. list-table:: Python
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-01-02 19:55:33 +03:00
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-01-02 19:55:33 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Flake8
|
|
|
|
- Yes (with `autopep8 <https://github.com/hhatto/autopep8>`_)
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1155970 <https://bugzilla.mozilla.org/show_bug.cgi?id=1155970>`_
|
2020-02-21 16:54:46 +03:00
|
|
|
- :ref:`Flake8`
|
2020-01-02 19:55:33 +03:00
|
|
|
- http://flake8.pycqa.org/
|
2020-07-09 01:08:08 +03:00
|
|
|
* - black
|
|
|
|
- Yes
|
|
|
|
- `bug 1555560 <https://bugzilla.mozilla.org/show_bug.cgi?id=1555560>`_
|
|
|
|
- :ref:`black`
|
|
|
|
- https://black.readthedocs.io/en/stable
|
2020-06-18 23:04:50 +03:00
|
|
|
* - pylint
|
|
|
|
-
|
|
|
|
- `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`_
|
|
|
|
- :ref:`pylint`
|
|
|
|
- https://www.pylint.org/
|
2020-06-20 15:28:48 +03:00
|
|
|
* - Python 2/3 compatibility check
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1496527 <https://bugzilla.mozilla.org/show_bug.cgi?id=1496527>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`Python 2/3 compatibility check`
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
.. list-table:: Rust
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-01-02 19:55:33 +03:00
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-01-02 19:55:33 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Rustfmt
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1454764 <https://bugzilla.mozilla.org/show_bug.cgi?id=1454764>`_
|
2020-02-21 16:54:46 +03:00
|
|
|
- :ref:`Rustfmt`
|
2020-01-02 19:55:33 +03:00
|
|
|
- https://github.com/rust-lang/rustfmt
|
|
|
|
* - Clippy
|
|
|
|
-
|
2020-03-07 00:01:22 +03:00
|
|
|
- `bug 1361342 <https://bugzilla.mozilla.org/show_bug.cgi?id=1361342>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
- :ref:`clippy`
|
|
|
|
- https://github.com/rust-lang/rust-clippy
|
|
|
|
|
|
|
|
.. list-table:: Java
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-01-02 19:55:33 +03:00
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-01-02 19:55:33 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Infer
|
|
|
|
-
|
2020-03-07 15:13:02 +03:00
|
|
|
- `bug 1175203 <https://bugzilla.mozilla.org/show_bug.cgi?id=1175203>`_
|
2020-01-02 19:55:33 +03:00
|
|
|
-
|
|
|
|
- https://github.com/facebook/infer
|
2020-02-21 16:54:46 +03:00
|
|
|
|
|
|
|
.. list-table:: Others
|
2020-03-07 00:01:22 +03:00
|
|
|
:widths: 20 20 20 20 20
|
2020-02-21 16:54:46 +03:00
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
2020-03-07 00:01:22 +03:00
|
|
|
- Meta bug
|
2020-02-21 16:54:46 +03:00
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - shellcheck
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-02-21 16:54:46 +03:00
|
|
|
-
|
|
|
|
-
|
|
|
|
- https://www.shellcheck.net/
|
|
|
|
* - rstchecker
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-02-21 16:54:46 +03:00
|
|
|
-
|
|
|
|
- :ref:`RST Linter`
|
|
|
|
- https://github.com/myint/rstcheck
|
|
|
|
* - Typo detection
|
|
|
|
- Yes
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-02-21 16:54:46 +03:00
|
|
|
- :ref:`Codespell`
|
|
|
|
- https://github.com/codespell-project/codespell
|
|
|
|
* - YAML linter
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2020-02-21 16:54:46 +03:00
|
|
|
-
|
|
|
|
-
|
|
|
|
- https://github.com/adrienverge/yamllint
|
|
|
|
|