Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aca38da
Add lint and format commands
bentsherman Mar 20, 2025
338fad5
Pretty printing for `lint` and `format` commands (#5915)
ewels Apr 1, 2025
06964b3
Remove `file://` prefix from include errors
bentsherman Apr 1, 2025
9c75a65
Add unit tests for exclude patterns from language server
bentsherman Apr 1, 2025
8feb8fe
Fix failing test
bentsherman Apr 1, 2025
48e8dd9
Merge branch 'master' into lint-format-commands
bentsherman Apr 1, 2025
afed0f9
Add unit tests
bentsherman Apr 2, 2025
57b3ad7
Add unit tests for config parser
bentsherman Apr 2, 2025
e291018
Update docs
bentsherman Apr 3, 2025
acce8f9
Disable ANSI control codes when ansi log is disabled
bentsherman Apr 3, 2025
68e61b9
Fix path exclusion checker
bentsherman Apr 3, 2025
16b513d
Improve directory traversal
bentsherman Apr 3, 2025
29886d5
Fix include checking
bentsherman Apr 4, 2025
7071a10
Merge branch 'master' into lint-format-commands
pditommaso Apr 4, 2025
820f246
Update docs/reference/cli.md {ci skip]
bentsherman Apr 4, 2025
9d3642a
Fix failing test
bentsherman Apr 4, 2025
7a19a0e
Add unit test for visitFiles
bentsherman Apr 4, 2025
0f1603f
Add unit tests for include resolution
bentsherman Apr 4, 2025
7d18176
Fix failing tests
bentsherman Apr 4, 2025
39f32b9
Merge branch 'master' into lint-format-commands
pditommaso Apr 7, 2025
4c3c6bf
Rename `-output-format` -> `-output` (consistent with `config` command)
bentsherman Apr 7, 2025
82b578b
Remove emojis
bentsherman Apr 7, 2025
bbfe173
Rename `lint` -> `check`
bentsherman Apr 7, 2025
e6ea836
Resolve all included modules in `check` command
bentsherman Apr 7, 2025
b8b503f
Merge branch 'check-format' into lint-format-commands
bentsherman Apr 7, 2025
01f877a
Fix failing tests
bentsherman Apr 7, 2025
8a31697
Fix bug with process/workflow inputs
bentsherman Apr 8, 2025
32941c7
Add unit test for formatting an operator chain
bentsherman Apr 8, 2025
11867d9
Rename StdoutErrorListener -> StandardErrorListener
bentsherman Apr 9, 2025
707c3e4
Include warnings in standard error listener
bentsherman Apr 9, 2025
0a4caa0
Fix class resolution errors
bentsherman Apr 9, 2025
7f8dd6c
Don't log non-nextflow files in `check` command
bentsherman Apr 9, 2025
84e73fd
Add option to sort script declarations
bentsherman Apr 10, 2025
c52784d
Fix bug with declaration sorting
bentsherman Apr 10, 2025
2ef7c5a
Combine `check` and `format` into `lint` command
bentsherman Apr 11, 2025
4326693
Fix formatting of param declarations
bentsherman Apr 11, 2025
9d907ce
Merge branch 'master' into lint-format-commands [ci fast]
pditommaso Apr 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,60 @@ Execute a pipeline into a Kubernetes cluster.
$ nextflow kuberun nextflow-io/hello
```

### `lint`

Lint Nextflow scripts and config files.

**Usage**

```console
$ nextflow lint [options] [paths]
```

**Description**

The `lint` command parses and analyzes the given Nextflow scripts and config files, formats them if specified, and prints any errors. Directories are recursively scanned for scripts and config files to lint.

**Options**

`-exclude`
: File pattern to exclude from linting. Can be specified multiple times (default: `.git, .nf-test, work`).

`-format`
: Format scripts and config files that have no errors.

`-o, -output`
: Output mode for reporting errors: `full`, `extended`, `concise`, `json` (default: `full`).

`-sort-declarations`
: Sort script declarations in Nextflow scripts (default: `false`).

`-spaces`
: Number of spaces to indent (default: `4`).

`-tabs`
: Indent with tabs (default: `false`).

**Examples**

Lint a specific file.

```console
$ nextflow lint main.nf
```

Lint all files in the current directory (and subdirectories) with concise output.

```console
$ nextflow lint -o concise .
```

Lint and format all files in the current directory (and subdirectories) and use two spaces per indent.

```console
$ nextflow lint -format -spaces 2 .
```

### `list`

List all downloaded projects.
Expand Down
Loading