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:
|
|
|
|
|
2021-03-22 20:28:37 +03:00
|
|
|
static-analysis/index.rst
|
2020-02-11 12:11:44 +03:00
|
|
|
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-09-29 21:48:17 +03:00
|
|
|
- `bug 712350 <https://bugzilla.mozilla.org/show_bug.cgi?id=712350>`__
|
2021-06-10 22:33:53 +03:00
|
|
|
- :ref:`Static analysis <Static Analysis>`
|
2020-01-02 19:55:33 +03:00
|
|
|
- https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
|
|
|
* - Clang analyzer
|
|
|
|
-
|
2020-09-29 21:48:17 +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/
|
|
|
|
* - 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-09-29 21:48:17 +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-09-29 21:48:17 +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-09-29 21:48:17 +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-09-29 21:48:17 +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-09-29 21:48:17 +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-09-29 21:48:17 +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
|
2020-09-29 21:48:17 +03:00
|
|
|
- `bug 1555560 <https://bugzilla.mozilla.org/show_bug.cgi?id=1555560>`__
|
2020-07-09 01:08:08 +03:00
|
|
|
- :ref:`black`
|
|
|
|
- https://black.readthedocs.io/en/stable
|
2020-06-18 23:04:50 +03:00
|
|
|
* - pylint
|
|
|
|
-
|
2020-09-29 21:48:17 +03:00
|
|
|
- `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`__
|
2020-06-18 23:04:50 +03:00
|
|
|
- :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-09-29 21:48:17 +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-09-29 21:48:17 +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-09-29 21:48:17 +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
|
|
|
|
|
2022-06-29 01:58:11 +03:00
|
|
|
.. list-table:: Java
|
|
|
|
:widths: 20 20 20 20 20
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Tools
|
|
|
|
- Has autofixes
|
|
|
|
- Meta bug
|
|
|
|
- More info
|
|
|
|
- Upstream
|
|
|
|
* - Spotless
|
|
|
|
- Yes
|
|
|
|
- `bug 1571899 <https://bugzilla.mozilla.org/show_bug.cgi?id=1571899>`__
|
|
|
|
- :ref:`Spotless`
|
|
|
|
- https://github.com/diffplug/spotless
|
|
|
|
|
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
|
2022-07-26 22:48:08 +03:00
|
|
|
* - Fluent Lint
|
|
|
|
- No
|
|
|
|
-
|
|
|
|
- :ref:`Fluent Lint`
|
|
|
|
-
|
2020-02-21 16:54:46 +03:00
|
|
|
* - YAML linter
|
2022-08-09 22:13:45 +03:00
|
|
|
- No
|
2020-03-07 00:01:22 +03:00
|
|
|
-
|
2022-08-09 22:13:45 +03:00
|
|
|
- :ref:`yamllint`
|
2020-02-21 16:54:46 +03:00
|
|
|
- https://github.com/adrienverge/yamllint
|