forked from mirrors/gecko-dev
This for a few reasons: * The summary becomes the landing page for code quality: https://firefox-source-docs.mozilla.org/tools/static-analysis/summary.html * I don't think we need a full code quality category * Closer to the source-code-doc * All the files at the same place Differential Revision: https://phabricator.services.mozilla.com/D61767 --HG-- rename : tools/lint/docs/coding-style/coding_style_java.rst => docs/code-quality/coding-style/coding_style_java.rst rename : tools/lint/docs/coding-style/coding_style_other.rst => docs/code-quality/coding-style/coding_style_other.rst rename : tools/lint/docs/coding-style/coding_style_python.rst => docs/code-quality/coding-style/coding_style_python.rst rename : tools/lint/docs/coding-style/format_cpp_code_with_clang-format.rst => docs/code-quality/coding-style/format_cpp_code_with_clang-format.rst rename : tools/clang-tidy/docs/summary.rst => docs/code-quality/index.rst rename : tools/lint/docs/create.rst => docs/code-quality/lint/create.rst rename : tools/lint/docs/index.rst => docs/code-quality/lint/index.rst rename : tools/lint/docs/index.rst => docs/code-quality/lint/lint.rst rename : tools/lint/docs/linters/codespell.rst => docs/code-quality/lint/linters/codespell.rst rename : tools/lint/docs/linters/cpp-virtual-final.rst => docs/code-quality/lint/linters/cpp-virtual-final.rst rename : tools/lint/docs/linters/eslint-plugin-mozilla.rst => docs/code-quality/lint/linters/eslint-plugin-mozilla.rst rename : tools/lint/docs/linters/eslint-plugin-spidermonkey-js.rst => docs/code-quality/lint/linters/eslint-plugin-spidermonkey-js.rst rename : tools/lint/docs/linters/eslint.rst => docs/code-quality/lint/linters/eslint.rst rename : tools/lint/docs/linters/file-perm.rst => docs/code-quality/lint/linters/file-perm.rst rename : tools/lint/docs/linters/file-whitespace.rst => docs/code-quality/lint/linters/file-whitespace.rst rename : tools/lint/docs/linters/flake8.rst => docs/code-quality/lint/linters/flake8.rst rename : tools/lint/docs/linters/l10n.rst => docs/code-quality/lint/linters/l10n.rst rename : tools/lint/docs/linters/license.rst => docs/code-quality/lint/linters/license.rst rename : tools/lint/docs/linters/lintpref.rst => docs/code-quality/lint/linters/lintpref.rst rename : tools/lint/docs/linters/mingw-capitalization.rst => docs/code-quality/lint/linters/mingw-capitalization.rst rename : tools/lint/docs/linters/perfdocs.rst => docs/code-quality/lint/linters/perfdocs.rst rename : tools/lint/docs/linters/rstlinter.rst => docs/code-quality/lint/linters/rstlinter.rst rename : tools/lint/docs/linters/rustfmt.rst => docs/code-quality/lint/linters/rustfmt.rst rename : tools/lint/docs/usage.rst => docs/code-quality/lint/usage.rst rename : tools/clang-tidy/docs/index.rst => docs/code-quality/static-analysis.rst extra : moz-landing-system : lando
31 lines
1.4 KiB
ReStructuredText
31 lines
1.4 KiB
ReStructuredText
Linting
|
|
=======
|
|
|
|
Linters are used in mozilla-central to help enforce coding style and avoid bad practices. Due to the
|
|
wide variety of languages in use, this is not always an easy task. In addition, linters should be runnable from editors, from the command line, from review tools
|
|
and from continuous integration. It's easy to see how the complexity of running all of these
|
|
different kinds of linters in all of these different places could quickly balloon out of control.
|
|
|
|
``Mozlint`` is a library that accomplishes several goals:
|
|
|
|
1. It provides a standard method for adding new linters to the tree, which can be as easy as
|
|
defining a config object in a ``.yml`` file. This helps keep lint related code localized, and
|
|
prevents different teams from coming up with their own unique lint implementations.
|
|
2. It provides a streamlined interface for running all linters at once. Instead of running N
|
|
different lint commands to test your patch, a single ``mach lint`` command will automatically run
|
|
all applicable linters. This means there is a single API surface that other tools can use to
|
|
invoke linters.
|
|
3. With a simple taskcluster configuration, Mozlint provides an easy way to execute all these jobs
|
|
at review phase.
|
|
|
|
``Mozlint`` isn't designed to be used directly by end users. Instead, it can be consumed by things
|
|
like mach, phabricator and taskcluster.
|
|
|
|
.. toctree::
|
|
:caption: Linting User Guide
|
|
:maxdepth: 1
|
|
:glob:
|
|
|
|
usage
|
|
create
|
|
linters/*
|