@@ -65,7 +65,7 @@ documentation, configuration files, etc. When the workflow is :ref:`installed
65
65
.. _SyntaxHighlighting :
66
66
67
67
Syntax Highlighting For Workflow Configuration
68
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+ ----------------------------------------------
69
69
70
70
Cylc provides syntax plugins for the following editors:
71
71
@@ -107,7 +107,7 @@ WebStorm
107
107
Install the `Cylc.tmbundle `_.
108
108
109
109
Gross File Structure
110
- ^^^^^^^^^^^^^^^^^^^^
110
+ --------------------
111
111
112
112
Cylc :cylc:conf: `flow.cylc ` files consist of configuration items grouped under
113
113
several top level section headings:
@@ -134,7 +134,7 @@ several top level section headings:
134
134
.. _Validation :
135
135
136
136
Validation
137
- ^^^^^^^^^^
137
+ ----------
138
138
139
139
The ``cylc validate `` command evaluates the :cylc:conf: `flow.cylc ` file
140
140
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.
150
150
151
151
.. _cylc_lint_script :
152
152
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.
155
158
156
159
.. seealso ::
157
160
158
161
:ref: `How to configure Cylc lint at project level <lint.pyproject.toml >`
159
162
using a ``pyproject.toml ``.
160
163
164
+ ``cylc lint ``
165
+ ^^^^^^^^^^^^^
166
+
161
167
.. automodule :: cylc.flow.scripts.lint
162
168
163
169
.. _lint.pyproject.toml :
@@ -168,32 +174,40 @@ Configure ``cylc lint`` at project level
168
174
You can configure ``cylc lint `` for each workflow using a
169
175
``pyproject.toml `` file.
170
176
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:
173
179
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.
178
182
179
- Allowed Values: '728', 'style'
183
+ Allowed values: ``'728' ``, ``'style' ``, ``'all' ``.
184
+
185
+ (You can override this on the command line.)
180
186
181
- ignore
187
+ `` ignore ``
182
188
Individual rules to ignore: A list of rule codes, such as ``S007 ``.
183
189
184
- exclude
190
+ `` exclude ``
185
191
A list of files or glob patterns for files which will not be checked.
186
192
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
190
202
203
+ The ``[cylc-lint] `` section has been deprecated in favour of
204
+ ``[tool.cylc.lint] ``.
191
205
192
206
An example ``pyproject.toml `` might look like this:
193
207
194
208
.. code-block :: toml
195
209
196
- [cylc- lint]
210
+ [tool. cylc. lint]
197
211
# Enforce a line limit of 99 chars
198
212
max-line-length = 99
199
213
0 commit comments