Skip to content

Add -project-dir option to lint command#6728

Merged
bentsherman merged 2 commits intomasterfrom
cmd-lint-lib-dir
Mar 19, 2026
Merged

Add -project-dir option to lint command#6728
bentsherman merged 2 commits intomasterfrom
cmd-lint-lib-dir

Conversation

@bentsherman
Copy link
Copy Markdown
Member

@bentsherman bentsherman commented Jan 16, 2026

Close #6634

This PR updates the nextflow lint command to recognize project-level assets such as the lib directory and modules directory

  • Add -project-dir option to nextflow lint (defaults to .)
  • Pass project dir to ScriptParser so that it can resolve remote module includes against modules directory
  • Move shared class loader logic to ClassLoaderFactory so that it can be used by both Session and CmdLint
  • Update ResolveVisitor to handle Groovy classes from the lib directory
  • Add unit test based on linked issue

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 16, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit cb14077
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69bc3fbafd3b930008e2d841

@bentsherman bentsherman added this to the 26.04 milestone Feb 6, 2026
@pditommaso pditommaso force-pushed the master branch 2 times, most recently from d9fa5cd to d752bc2 Compare February 28, 2026 13:10
@bentsherman
Copy link
Copy Markdown
Member Author

TODO: specify -project-dir instead of -lib-dir so that nextflow lint can understand any project-level entities -- lib dir, modules dir, etc

@bentsherman bentsherman changed the title Add -lib option to nextflow lint Add -project-dir option to lint command Mar 18, 2026
@bentsherman bentsherman marked this pull request as ready for review March 18, 2026 14:50
@bentsherman bentsherman requested review from a team as code owners March 18, 2026 14:50
@bentsherman bentsherman requested a review from jorgee March 18, 2026 14:56
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
Comment thread modules/nf-lang/src/main/java/nextflow/script/control/GroovyCompiler.java Outdated
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman requested a review from jorgee March 19, 2026 18:28
@bentsherman bentsherman merged commit 1679b9f into master Mar 19, 2026
28 checks passed
@bentsherman bentsherman deleted the cmd-lint-lib-dir branch March 19, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nextflow linter errors on custom Groovy code in lib/ as not being defined

2 participants