Skip to content

Commit 7fc3256

Browse files
committed
Update docs for cylc lint
Deprecated `[cylc-lint]` in favour of `[tool.cylc.lint]` in `pyproject.toml`
1 parent 75deb23 commit 7fc3256

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

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

Lines changed: 30 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,38 @@ 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'``.
180184

181-
ignore
185+
``ignore``
182186
Individual rules to ignore: A list of rule codes, such as ``S007``.
183187

184-
exclude
188+
``exclude``
185189
A list of files or glob patterns for files which will not be checked.
186190

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.
191+
``max-line-length``
192+
Set longest line length to permit in Cylc configs for this project.
193+
194+
Default: ``130``.
195+
196+
197+
.. note::
198+
199+
.. versionchanged:: 8.3.0
190200

201+
The ``[cylc-lint]`` section has been deprecated in favour of
202+
``[tool.cylc.lint]``.
191203

192204
An example ``pyproject.toml`` might look like this:
193205

194206
.. code-block:: toml
195207
196-
[cylc-lint]
208+
[tool.cylc.lint]
197209
# Enforce a line limit of 99 chars
198210
max-line-length = 99
199211

0 commit comments

Comments
 (0)