Skip to content

Commit 97db3ee

Browse files
authored
Merge pull request #687 from MetRonnie/cylc-lint
Update docs for `cylc lint`
2 parents c527537 + 09bac61 commit 97db3ee

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

src/user-guide/writing-workflows/configuration.rst

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ documentation, configuration files, etc. When the workflow is :ref:`installed
6565
.. _SyntaxHighlighting:
6666

6767
Syntax Highlighting For Workflow Configuration
68-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68+
----------------------------------------------
6969

7070
Cylc provides syntax plugins for the following editors:
7171

@@ -107,7 +107,7 @@ WebStorm
107107
Install the `Cylc.tmbundle`_.
108108

109109
Gross File Structure
110-
^^^^^^^^^^^^^^^^^^^^
110+
--------------------
111111

112112
Cylc :cylc:conf:`flow.cylc` files consist of configuration items grouped under
113113
several top level section headings:
@@ -134,7 +134,7 @@ several top level section headings:
134134
.. _Validation:
135135

136136
Validation
137-
^^^^^^^^^^
137+
----------
138138

139139
The ``cylc validate`` command evaluates the :cylc:conf:`flow.cylc` file
140140
against a specification that defines all legal entries, values and options.
@@ -150,14 +150,20 @@ show an inlined copy of the workflow with correct line numbers.
150150

151151
.. _cylc_lint_script:
152152

153-
``cylc lint``
154-
^^^^^^^^^^^^^
153+
Linting
154+
-------
155+
156+
The ``cylc lint`` command checks code style, deprecated syntax and other
157+
issues in Cylc configuration files.
155158

156159
.. seealso::
157160

158161
:ref:`How to configure Cylc lint at project level <lint.pyproject.toml>`
159162
using a ``pyproject.toml``.
160163

164+
``cylc lint``
165+
^^^^^^^^^^^^^
166+
161167
.. automodule:: cylc.flow.scripts.lint
162168

163169
.. _lint.pyproject.toml:
@@ -168,32 +174,40 @@ Configure ``cylc lint`` at project level
168174
You can configure ``cylc lint`` for each workflow using a
169175
``pyproject.toml`` file.
170176

171-
To define settings for ``cylc lint`` use a ``[cylc-lint]`` section.
172-
Within the ``[cylc-lint]`` section you may define the following:
177+
To define settings for ``cylc lint`` use a ``[tool.cylc.lint]`` section.
178+
Within the ``[tool.cylc.lint]`` section you may define the following:
173179

174-
rulesets
175-
A list of rulesets to use. If you run cylc lint without setting rulesets
176-
on the command line this value will override
177-
the default (``['728', 'style']``).
180+
``rulesets``
181+
A list of rulesets to use.
178182

179-
Allowed Values: '728', 'style'
183+
Allowed values: ``'728'``, ``'style'``, ``'all'``.
184+
185+
(You can override this on the command line.)
180186

181-
ignore
187+
``ignore``
182188
Individual rules to ignore: A list of rule codes, such as ``S007``.
183189

184-
exclude
190+
``exclude``
185191
A list of files or glob patterns for files which will not be checked.
186192

187-
max-line-length
188-
Set longest line length to permit in Cylc Configs for this project.
189-
If unset, line length is not checked.
193+
``max-line-length``
194+
Set longest line length to permit in Cylc configs for this project.
195+
196+
Default: ``130``.
197+
198+
199+
.. note::
200+
201+
.. versionchanged:: 8.3.0
190202

203+
The ``[cylc-lint]`` section has been deprecated in favour of
204+
``[tool.cylc.lint]``.
191205

192206
An example ``pyproject.toml`` might look like this:
193207

194208
.. code-block:: toml
195209
196-
[cylc-lint]
210+
[tool.cylc.lint]
197211
# Enforce a line limit of 99 chars
198212
max-line-length = 99
199213

0 commit comments

Comments
 (0)