summaryrefslogtreecommitdiffstats
path: root/docs/code-quality/lint/mozlint.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /docs/code-quality/lint/mozlint.rst
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/code-quality/lint/mozlint.rst')
-rw-r--r--docs/code-quality/lint/mozlint.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/code-quality/lint/mozlint.rst b/docs/code-quality/lint/mozlint.rst
new file mode 100644
index 0000000000..48a6a78a6f
--- /dev/null
+++ b/docs/code-quality/lint/mozlint.rst
@@ -0,0 +1,23 @@
+MozLint
+=======
+
+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.