Skip to content

More linting - #602

Merged
ypriverol merged 12 commits into
devfrom
more_linting
Nov 15, 2025
Merged

ypriverol merged 12 commits into
devfrom
more_linting

Conversation

@enryH

@enryH enryH commented Oct 29, 2025 •

Copy link
Copy Markdown
Collaborator

User description

PR checklist

  • This comment contains a description of changes (with reason).
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).

Changes

  • remove ToDo statements
  • fix some meta.yml warnings (snake_case module names are not encouraged, see guidelines)
  • remove workflow which wasn't used (is there a reason why this is duplicated?)

PR Type

Enhancement


Description

  • Remove TODO comments and clean up code

  • Fix snake_case module naming conventions in meta.yml

  • Remove unused PIPELINE_INITIALISATION workflow

  • Add meta.yml documentation for utils subworkflow

  • Remove unused imports from main.nf


Diagram Walkthrough

flowchart LR
  A["Code cleanup"] --> B["Remove TODO comments"]
  A --> C["Fix naming conventions"]
  A --> D["Remove unused code"]
  B --> E["README.md<br/>nextflow.config<br/>methods_description_template.yml"]
  C --> F["psm_fdr_control/meta.yml"]
  D --> G["main.nf<br/>utils_nfcore_quantms_pipeline/main.nf"]
  D --> H["Add meta.yml<br/>documentation"]
Loading

File Walkthrough

Relevant files
Documentation
4 files
README.md
Remove TODO comment from usage section                                     
+0/-2     
methods_description_template.yml
Remove TODO comment from methods template                               
+0/-1     
nextflow.config
Replace TODO with discussion reference                                     
+1/-3     
meta.yml
Add meta.yml documentation for utils subworkflow                 
+32/-0   
Code cleanup
2 files
main.nf
Remove unused PIPELINE_INITIALISATION import                         
+0/-1     
main.nf
Remove unused PIPELINE_INITIALISATION workflow                     
+0/-107 
Miscellaneous
1 files
ro-crate-metadata.json
Update description metadata from README                                   
+1/-1     
Formatting
1 files
main.nf
Fix alignment of include statement                                             
+1/-1     
Bug fix
1 files
meta.yml
Fix snake_case module names to use slashes                             
+2/-2     

@coderabbitai

coderabbitai Bot commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch more_linting

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit d69c7bd

+| ✅ 111 tests passed       |+
#| ❔  19 tests were ignored |#
!| ❗   1 tests had warnings |!
Details

❗ Test warnings:

  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 3.4.1
  • Run at 2025-11-15 08:06:08

@ypriverol

Copy link
Copy Markdown
Contributor

@enryH is this ready for review?

@enryH
enryH marked this pull request as ready for review November 3, 2025 17:29
@enryH

enryH commented Nov 3, 2025 •

Copy link
Copy Markdown
Collaborator Author

Yes. I checked that I commited everything.

  • I still want to see how the
    subworkflows/local/utils_nfcore_quantms_pipeline/main.nf is different from the nf-core template one.

@qodo-code-review

qodo-code-review Bot commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

(Compliance updated until commit d69c7bd)

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
⚪
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
⚪
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

⚪
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No auditing: Newly added or modified Nextflow subworkflow code does not introduce any logging or audit
trail for critical actions, but it may be handled elsewhere in the pipeline.

Referred Code
include { paramsSummaryMap          } from 'plugin/nf-schema'
include { completionEmail           } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary         } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification            } from '../../nf-core/utils_nfcore_pipeline'

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing errors: The inclusion changes and workflow declarations add no explicit error handling or
validation for edge cases, which may be acceptable if handled in included modules.

Referred Code
include { FALSE_DISCOVERY_RATE as FDR_CONSENSUSID } from '../../../modules/local/openms/false_discovery_rate/main'
include { ID_FILTER               } from '../../../modules/local/openms/id_filter/main'

workflow PSM_FDR_CONTROL {

    take:
    ch_id_files

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Missing validation: The new utils subworkflow code removes initialisation and does not add explicit input
validation or sanitization, which may be implemented in other components not visible in
this diff.

Referred Code
include { paramsSummaryMap          } from 'plugin/nf-schema'
include { completionEmail           } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary         } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification            } from '../../nf-core/utils_nfcore_pipeline'

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Previous compliance checks

Compliance check up to commit 0f44c0a
Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
⚪
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
⚪
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

⚪
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No audit logs: The added code primarily updates documentation/meta and includes subworkflows without
introducing or showing logging of critical actions, so there is no evidence in the diff
that audit-relevant events are recorded.

Referred Code
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "pipeline_completion"
description: Subworkflow for utils in the nf-core quantms pipeline
keywords:
  - utils
  - nf-core
  - quantms
components:
  - completionemail
  - completionsummary
  - imnotification
  - utils_nextflow_pipeline
  - utils_nfcore_pipeline
  - utils_nfschema_plugin
input:
  - ch_input:
      type: file
      description: |
        Channel containing input files for FDR control
output:
  - ch_fdr_results:


 ... (clipped 11 lines)
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
No error handling: The new code removes an initialisation workflow and adds no new steps with explicit error
handling, validations, or edge-case management, leaving uncertainty about robustness in
the affected subworkflow responsibilities.

Referred Code
//
// Subworkflow with functionality specific to the bigbio/quantms pipeline
//

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { paramsSummaryMap          } from 'plugin/nf-schema'
include { completionEmail           } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary         } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification            } from '../../nf-core/utils_nfcore_pipeline'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SUBWORKFLOW TO INITIALISE PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/



 ... (clipped 4 lines)
Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
No user errors: The changes adjust includes but do not show any user-facing error messaging or gating, so
it is unclear whether secure, generic user-facing errors are enforced.

Referred Code
include { QUANTMS  } from './workflows/quantms'
include { PIPELINE_COMPLETION     } from './subworkflows/local/utils_nfcore_quantms_pipeline'
include { UTILS_NEXTFLOW_PIPELINE   } from './subworkflows/nf-core/utils_nextflow_pipeline'
Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Validation removed: The diff removes the PIPELINE_INITIALISATION workflow (which previously performed
parameter validation and samplesheet checks) without showing an alternative, raising
uncertainty about continued input validation coverage.

Referred Code
//
// Subworkflow with functionality specific to the bigbio/quantms pipeline
//

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { paramsSummaryMap          } from 'plugin/nf-schema'
include { completionEmail           } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary         } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification            } from '../../nf-core/utils_nfcore_pipeline'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SUBWORKFLOW TO INITIALISE PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/



 ... (clipped 4 lines)

@qodo-code-review

qodo-code-review Bot commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Correct subworkflow input and output

Correct the input and output sections in
subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml to match the actual
parameters of the PIPELINE_COMPLETION workflow, as they appear to be incorrectly
copied from another file.

subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml [1-32]

 # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
 name: "pipeline_completion"
 description: Subworkflow for utils in the nf-core quantms pipeline
 keywords:
   - utils
   - nf-core
   - quantms
 components:
   - completionemail
   - completionsummary
   - imnotification
-  - utils_nextflow_pipeline
-  - utils_nfcore_pipeline
-  - utils_nfschema_plugin
 input:
-  - ch_input:
+  - email:
+      type: string
+      description: |
+        Email address to send completion summary to.
+  - email_on_fail:
+      type: string
+      description: |
+        Email address to send completion summary to on failure.
+  - outdir:
+      type: directory
+      description: |
+        The output directory where the results will be saved.
+  - workflow_name:
+      type: string
+      description: |
+        Name of the workflow.
+  - success:
+      type: boolean
+      description: |
+        Boolean indicating if the workflow was successful.
+  - multiqc_report:
       type: file
       description: |
-        Channel containing input files for FDR control
+        MultiQC report file.
 output:
-  - ch_fdr_results:
-      type: file
-      description: |
-        Channel containing FDR-controlled results
   - versions:
       type: file
       description: |
         Software versions used in this subworkflow
 authors:
   - "@bigbio"
 maintainers:
   - "@bigbio"
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the input and output sections in the new meta.yml file are wrong and proposes a fix that aligns with the PIPELINE_COMPLETION workflow definition, improving metadata accuracy.

Medium
Remove unused components from metadata

Update the components list in
subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml by removing
utils_nextflow_pipeline, utils_nfcore_pipeline, and utils_nfschema_plugin, as
they are no longer used in the corresponding main.nf file.

subworkflows/local/utils_nfcore_quantms_pipeline/meta.yml [8-14]

 components:
   - completionemail
   - completionsummary
   - imnotification
-  - utils_nextflow_pipeline
-  - utils_nfcore_pipeline
-  - utils_nfschema_plugin
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the components list in the new meta.yml is inconsistent with the changes in main.nf, as it lists components that are no longer used, and provides the correct fix.

Medium
  • Update

@ypriverol
ypriverol self-requested a review November 3, 2025 21:01
@ypriverol

Copy link
Copy Markdown
Contributor

I think we can merge this one.

@ypriverol
ypriverol merged commit 4fcb5db into dev Nov 15, 2025
@ypriverol
ypriverol deleted the more_linting branch January 8, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants