# Linter using the Nextflow Language Server

**URL:** <https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404>\
**Category:** Ask for help\
**Tags:** vscode\
**Created:** [November 13, 2024, 10:24am UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404 "2024-11-13T10:24:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mbc/32/742_2.png) [@mbc](https://community.seqera.io/u/mbc)\
**Post date:** [November 13, 2024, 10:24am UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/1 "2024-11-13T10:24:17Z")

</div>

Hi folks,

The language server and the VSCode plugin are great! I’ve been pruning our team pipelines of warnings and errors. Good stuff.

A linter built on top of the language server would be very helpful. Then it would be possible to have a pre-commit hook and a GitHub action that run the linter for us. I was playing around with the language server this morning, trying to build a Python command-line utility to be used as a linter, but I was wondering if someone else has already built this?

Cheers

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [November 13, 2024, 12:53pm UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/2 "2024-11-13T12:53:16Z")

</div>

Hi Martin, we are planning to incorporate the new error checking into Nextflow itself, hopefully in an upcoming edge release in the next few months. I’m thinking we’ll add a `nextflow check` command that just parses the code, prints any errors/warnings, and exits without running the pipeline.

---

<div class="post-metadata">

**Author:** ![mbc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mbc/32/742_2.png) [@mbc](https://community.seqera.io/u/mbc)\
**Post date:** [November 13, 2024, 1:03pm UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/3 "2024-11-13T13:03:51Z")

</div>

Hey Ben,

That’s perfect, I’m looking forward to that. I’ll probably tinker with my LSP linter thingy anyway - just for fun.

Cheers

---

<div class="post-metadata">

**Author:** ![mbc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mbc/32/742_2.png) [@mbc](https://community.seqera.io/u/mbc)\
**Post date:** [November 18, 2024, 12:12pm UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/4 "2024-11-18T12:12:51Z")

</div>

Well… after a weekend of tinkering with Groovy and the NF LSP, I wrote this small tool: [GitHub - mberacochea/nf-linter: A linter for Nextflow built on top of the Nextflow Language Server](https://github.com/mberacochea/nf-linter).

I am not a Groovy person, so it’s probably full of anti-patterns and code smells. But it seems to work 🙂

---

<div class="post-metadata">

**Author:** ![bentsherman](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/bentsherman/32/52_2.png) [@bentsherman](https://community.seqera.io/u/bentsherman)\
**Post date:** [November 18, 2024, 3:13pm UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/5 "2024-11-18T15:13:05Z")

</div>

Very cool! And surprisingly simple

---

<div class="post-metadata">

**Author:** ![mbc](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mbc/32/742_2.png) [@mbc](https://community.seqera.io/u/mbc)\
**Post date:** [May 16, 2025, 10:53am UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/6 "2025-05-16T10:53:23Z")

</div>

Nextflow just shipped its own linter =\> [CLI reference — Nextflow documentation](https://www.nextflow.io/docs/latest/reference/cli.html#lint)

Good stuff.

---

<div class="post-metadata">

**Author:** ![ewels](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/ewels/32/1_2.png) [@ewels](https://community.seqera.io/u/ewels)\
**Post date:** [May 26, 2025, 6:00am UTC](https://community.seqera.io/t/linter-using-the-nextflow-language-server/1404/7 "2025-05-26T06:00:13Z")

</div>

This topic was automatically closed after 9 days. New replies are no longer allowed.
