@@ -149,3 +149,49 @@ show an inlined copy of the workflow with correct line numbers.
149
149
150
150
.. automodule :: cylc.flow.scripts.lint
151
151
152
+ Configure ``cylc lint `` at project level
153
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154
+
155
+ You can configure ``cylc lint `` for each workflow using a
156
+ ``pyproject.toml `` file.
157
+
158
+ To define settings for ``cylc lint `` use a ``[cylc-lint] `` section.
159
+ Within the ``[cylc-lint] `` section you may define the following:
160
+
161
+ rulesets
162
+ A list of rulesets to use. If you run cylc lint without setting rulesets
163
+ on the command line this value will override
164
+ the default (``['728', 'style'] ``).
165
+
166
+ Allowed Values: '728', 'style'
167
+
168
+ ignore
169
+ Individual rules to ignore: A list of rule codes, such as ``S007 ``.
170
+
171
+ exclude
172
+ A list of files or glob patterns for files which will not be checked.
173
+
174
+ max-line-length
175
+ Set longest line length to permit in Cylc Configs for this project.
176
+ If unset, line length is not checked.
177
+
178
+
179
+ An example ``pyproject.toml `` might look like this:
180
+
181
+ .. code-block :: toml
182
+
183
+ [cylc-lint]
184
+ # Enforce a line limit of 99 chars
185
+ max-line-length = 99
186
+
187
+ # Ignore style [S] rule 007 (It's good practice comment with a reason)
188
+ ignore = ['S007'] # Family names start with lowercase in this workflow
189
+
190
+ # Don't check files matching these globs
191
+ exclude = ['history/*.old.cylc', 'someother.cylc']
192
+
193
+ # By default check for style
194
+ rulesets = ['style']
195
+
196
+ [some-other-section]
197
+ # Cylc lint won't pay any attention to this.
0 commit comments