Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
7 changes: 7 additions & 0 deletions .github/workflows/lint-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: "Skip linting subworkflows"
type: boolean
default: false
no_cache:
description: "Skip linting cache to force fresh linting of all files"
type: boolean
default: false

permissions:
contents: write
Expand Down Expand Up @@ -145,6 +149,9 @@ jobs:
if [[ "${{ inputs.skip_subworkflows }}" == "true" ]]; then
CMD="$CMD --skip-subworkflows"
fi
if [[ "${{ inputs.no_cache }}" == "true" ]]; then
CMD="$CMD --no-cache"
fi

# Add specific filters if provided
if [[ -n "${{ inputs.pipelines }}" ]]; then
Expand Down
12 changes: 6 additions & 6 deletions src/strict_syntax_health/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,11 @@ def _run_subworkflows_lint_bulk(subworkflows: list[dict], nextflow_version: str)


def display_results(
results: list[dict], title: str = "nf-core Strict Syntax Health", show_prints_help: bool = False
results: list[dict], type: str, show_prints_help: bool = False
) -> None:
"""Display results in a rich table."""
table = Table(title=title)
table.add_column("Pipeline", style="cyan")
table = Table(f"nf-core {type.capitalize()} Strict Syntax Health")
table.add_column(type.capitalize(), style="cyan")
table.add_column("Parse Error", justify="right")
table.add_column("Errors", justify="right")
table.add_column("Warnings", justify="right")
Expand Down Expand Up @@ -1737,7 +1737,7 @@ def main(
console.print(f"Filtering to {len(pipelines)} pipeline(s): {', '.join(p['name'] for p in pipelines)}")

pipeline_results = run_pipeline_lint(pipelines, no_cache=no_cache)
display_results(pipeline_results, title="nf-core Pipeline Strict Syntax Health", show_prints_help=True)
display_results(pipeline_results, type="pipeline", show_prints_help=True)
# Save results for aggregation (only when not filtering specific pipelines)
if not pipeline:
save_results_for_type("pipelines", pipeline_results)
Expand Down Expand Up @@ -1788,7 +1788,7 @@ def main(

module_results = run_modules_lint(modules, nextflow_version)

display_results(module_results, title="nf-core Module Strict Syntax Health")
display_results(module_results, type="module")
# Save results for aggregation (only when not filtering specific modules)
if not module:
save_results_for_type("modules", module_results, repo_commit=repo_commit)
Expand Down Expand Up @@ -1820,7 +1820,7 @@ def main(

subworkflow_results = run_subworkflows_lint(subworkflows, nextflow_version)

display_results(subworkflow_results, title="nf-core Subworkflow Strict Syntax Health")
display_results(subworkflow_results, type="subworkflow")
# Save results for aggregation (only when not filtering specific subworkflows)
if not subworkflow:
save_results_for_type("subworkflows", subworkflow_results, repo_commit=repo_commit)
Expand Down
Loading