-
Notifications
You must be signed in to change notification settings - Fork 955
Fix variable redeclarations for strict syntax compliance (from branch) #9756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ewels
wants to merge
29
commits into
master
Choose a base branch
from
fix/variable-redeclarations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove variable redeclarations by renaming closure parameters and local variables that shadow input parameters or previously declared variables. Fixed modules: - bbmap/bbsplit: Renamed 'index' closure parameter to 'idx' in eachWithIndex - bedtools/groupby: Renamed local 'summary_col' to 'summary_col_opt' - mafft/align: Renamed stub section variables with '_stub' suffix - spaceranger/count: Renamed option variables with '_opt' suffix This addresses variable redeclaration errors flagged by nextflow lint in strict syntax mode (NXF_SYNTAX_PARSER=v2). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Continue fixing variable redeclaration errors for strict syntax mode: - krakentools/extractkrakenreads: Use distinct meta parameter names (meta2, meta3) - mafft/align: Rename local option variables with _opt suffix - blobtk/plot: Add def keyword to script section variables - cellranger/count: Add def keyword to script section variables - diann: Add def keyword to script section variables - flash: Add def keyword to script section variables - scds: Add def keyword to script section variables In strict syntax mode, all variable declarations must use the def keyword explicitly, and variables cannot be redeclared within the same scope. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Continue fixing variable redeclarations: - peka, pureclip: Use distinct meta parameter names for multiple tuple inputs - svtyper/svtyper: Fix duplicate meta2 in inputs, rename vcf shadow variable - svtyper/svtypersso: Rename vcf and fasta shadow variables with _opt suffix - cellrangerarc/mkref: Rename reference_config to reference_config_name - eklipse: Rename ref_gb to ref_gb_path - ichorcna/createpon: Rename exons to exons_opt, add def to prefix - igvreports: Rename fasta to fasta_opt Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Complete fixing all variable redeclaration errors for strict syntax mode: - pureclip: Use distinct meta parameter name (meta3) for third input - jvarkit/sam2tsv, jvarkit/vcf2table: Rename regions_file to regions_opt - hmmer/hmmfetch: Rename index to index_opt - chewbbaca/createschema: Rename prodigal_tf and cds to *_opt - cnvnator/cnvnator: Add def to prefix in script section - crumble: Rename bedout to bedout_opt in both script and stub - gmmdemux: Rename skip and type_report to *_opt - happy/sompy: Rename bams to bams_opt - salsa2: Rename gfa and dup to *_opt - sam2lca/analyze: Rename database to database_path - segemehl/align: Rename reads to reads_opt, add def to prefix - svanalyzer/svbenchmark: Rename bed to bed_opt All 53 variable redeclaration errors have been resolved. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Addresses review comments from @SPPearce on PR #9684: 1. Remove 'def' from prefix variables used in output blocks: - cnvnator/cnvnator: Remove def from prefix (script & stub) - diann: Remove def from prefix (script & stub) - flash: Remove def from prefix (script & stub) - ichorcna/createpon: Remove def from prefix (script only) - segemehl/align: Remove def from prefix (script only) 2. Remove unnecessary variable declarations: - mafft/align: Remove unused stub variables (args_stub, add_stub, addfragments_stub, addfull_stub, addprofile_stub, addlong_stub) - mafft/align: Remove def from prefix (script) and prefix_stub 3. Improve code formatting: - spaceranger/count: Add backslash continuation between image option variables for better readability All changes verified with: - nextflow lint (all modules pass) - NXF_SYNTAX_PARSER=v2 nextflow inspect (all modules pass) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
When process inputs use meta2/meta3 to avoid variable redeclaration, the corresponding meta.yml files must document these renamed variables. Updated: - krakentools/extractkrakenreads: meta → meta2, meta3 - peka: meta → meta2 - pureclip: meta → meta2, meta3 - svtyper/svtyper: meta2 → meta3 (for fai input) All modules verified with: - nextflow inspect (standard parser) - NXF_SYNTAX_PARSER=v2 nextflow inspect (strict parser) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolve merge conflicts in: - bbmap/bbsplit: Use _idx for unused loop variable - bedtools/groupby: Use input summary_col with proper syntax - mafft/align: Keep _opt suffix variables to avoid redeclarations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove `def` from prefix variable to make it accessible to the tag directive which is evaluated before the script block. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- hmmer/hmmfetch: Update test data URL from master to 0.9 tag (master branch no longer has the HMM file) - peka: Bump version from 1.0.0 to 1.0.2 (1.0.0 requires numpy 1.17.4 which is no longer available) - crumble: Update test assertions to not use bam() plugin for CRAM (htsjdk doesn't support CRAM 3.1 format) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update barrnap test data URL from master to 0.9 tag. The master branch no longer has the HMM database files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- peka: Update versions.yml hash for 1.0.2 - svtyper/svtypersso: Update VCF output hash Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove `def` from variables that need to be accessible to templates. Variables defined with `def` are local to the script block and cannot be accessed by template files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update to use existing test data from modules branch. The scdownstream branch does not exist. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update hmmer/hmmrank snapshot with new MD5 hash after barrnap URL fix - Update svtyper/svtypersso snapshot with correct bam test MD5 hash - Fix scds test to use raw_matrix.sce.rds which has required "counts" assay Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The SCDS test data at scdownstream/samples/SAMN14430801_... doesn't exist. This is a pre-existing issue, not caused by this PR. The module needs proper test data added to nf-core/test-datasets before it can be fixed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use existing test data from scdownstream branch (pbmc/SRR28679757_raw_matrix.sce.rds) - Remove def from prefix in both script and stub blocks for template access Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update svtyper/svtypersso snapshot hashes for bam and bam_vcf_fasta tests - Keep scds prefix fix (remove def) for template access, revert test URL changes as no available test data has required "counts" assay Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use commit-pinned URL for scds test data with counts assay - Update svtyper/svtypersso snapshot hashes for bam and bam_vcf_fasta tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Repeat of #9684 but from a branch, not a fork.