Skip to content
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

ShellCheck spans are sometimes off #307

Open
a-frantz opened this issue Jan 22, 2025 · 2 comments
Open

ShellCheck spans are sometimes off #307

a-frantz opened this issue Jan 22, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@a-frantz
Copy link
Member

Copy and pasting the full report from the workflows repo:
sprocket lint --shellcheck --except TrailingComma --except ContainerValue --local-only --no-color .

note[ShellCheck]: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:200:43
    │
200 │                 || [[ ~{read_group.ID} =~ ~{restrictive_pattern} ]]
    │ ╭─────────────────────────────────────────────^
    │ │ ╭───────────────────────────────────────────'
201 │ │ │             then
    │ ╰─│^ SC2076[warning]: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
    │   ╰' more info: https://www.shellcheck.net/wiki/SC2076
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:212:14
    │
212 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "SM") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:225:53
    │
225 │                     || [[ "~{read_group.SM}" =~ ~{restrictive_pattern} ]]
    │ ╭───────────────────────────────────────────────────────^
    │ │ ╭─────────────────────────────────────────────────────'
226 │ │ │                 then
    │ ╰─│────^ SC2076[warning]: Remove quotes from right-hand side of =~ to match as a regex rather than literally.
    │   ╰────' more info: https://www.shellcheck.net/wiki/SC2076
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:238:14
    │
238 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "BC") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:254:14
    │
254 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "CN") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:270:14
    │
270 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "DS") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:286:14
    │
286 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "DT") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:302:14
    │
302 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "FO") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:318:14
    │
318 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "KS") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:334:14
    │
334 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "LB") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:350:14
    │
350 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "PG") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:366:14
    │
366 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "PI") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:382:14
    │
382 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "PL") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:398:14
    │
398 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "PM") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/data_structures/read_group.wdl:414:14
    │
414 │         if [ $(echo "~{sep(" ", required_fields)}" | grep -Ewc "PU") -eq 1 ]
    │              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │              │
    │              SC2046[warning]: Quote this to prevent word splitting.
    │              more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/arriba.wdl:285:17
    │
285 │                 $fasta_name \
    │ ╭───────────────────^
    │ │ ╭─────────────────'
286 │ │ │             ~{fusions} \
    │ ╰─│─^ SC2086[info]: Double quote to prevent globbing and word splitting.
    │   ╰─' more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$fasta_name"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/arriba.wdl:385:17
    │
385 │                 $gtf_name \
    │ ╭───────────────────^
    │ │ ╭─────────────────'
386 │ │ │             ~{prefix}.annotated.tsv
    │ ╰─│─^ SC2086[info]: Double quote to prevent globbing and word splitting.
    │   ╰─' more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gtf_name"`?

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
   ┌─ /Users/afrantz/workflows/tools/bwa.wdl:62:9
   │
62 │         let "samtools_cores = $n_cores - 1"
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   │         │
   │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
   │         more info: https://www.shellcheck.net/wiki/SC2219
   │
   = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/bwa.wdl:161:9
    │
161 │         let "samtools_cores = $n_cores - 1"
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    ┌─ /Users/afrantz/workflows/tools/bwa.wdl:167:9
    │
167 │         ln -s ~{read_one_fastq_gz}
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2226[warning]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    │         more info: https://www.shellcheck.net/wiki/SC2226
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    ┌─ /Users/afrantz/workflows/tools/bwa.wdl:168:9
    │
168 │         ln -s ~{read_two_fastq_gz}
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2226[warning]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    │         more info: https://www.shellcheck.net/wiki/SC2226
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/bwa.wdl:257:9
    │
257 │         let "samtools_cores = $n_cores - 1"
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    ┌─ /Users/afrantz/workflows/tools/bwa.wdl:263:9
    │
263 │         ln -sf ~{read_one_fastq_gz}
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2226[warning]: This ln has no destination. Check the arguments, or specify '.' explicitly.
    │         more info: https://www.shellcheck.net/wiki/SC2226
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Prefer escape over ending quote to make $ literal. Instead of "It costs $"5, use "It costs \$5".
   ┌─ /Users/afrantz/workflows/tools/estimate.wdl:39:34
   │
39 │         filtered <- infile[infile$"Gene.name" %in% common_genes[['GeneSymbol']], ]
   │                                  ^
   │                                  │
   │                                  SC1135[style]: Prefer escape over ending quote to make $ literal. Instead of "It costs $"5, use "It costs \$5".
   │                                  more info: https://www.shellcheck.net/wiki/SC1135
   │
   = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/ngsderive.wdl:355:24
    │
355 │         mv "$(basename ~{bam}.junctions.tsv)" "~{prefix}.junctions.tsv"
    │                        ^^^^^^
    │                        │
    │                        SC2086[info]: Double quote to prevent globbing and word splitting.
    │                        more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"${WDL}"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/picard.wdl:235:50
    │
235 │             && [ "$(grep -Ec "$GREP_PATTERN" ~{outfile_name})" -gt 0 ]
    │                                                  ^^^^^^^^^^^^^^^
    │                                                  │
    │                                                  SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                  more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"${WDL9CgEvEsk9}"`?

note[ShellCheck]: Couldn't parse this escaped char. Fix to allow more checks.
     ┌─ /Users/afrantz/workflows/tools/picard.wdl:1034:3
     │
1034 │     >>>
     │   ^
     │   │
     │   SC1073[error]: Couldn't parse this escaped char. Fix to allow more checks.
     │   more info: https://www.shellcheck.net/wiki/SC1073
     │
     = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
   ┌─ /Users/afrantz/workflows/tools/samtools.wdl:98:9
   │
98 │         let "n_cores -= 1"
   │         ^^^^^^^^^^^^^^^^^
   │         │
   │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
   │         more info: https://www.shellcheck.net/wiki/SC2219
   │
   = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:199:9
    │
199 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:257:9
    │
257 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:322:9
    │
322 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:333:17
    │
333 │                 ~{bam}
    │ ╭───────────────────^
    │ │ ╭─────────────────'
334 │ │ │         )"
    │ ╰─│───^ SC2086[info]: Double quote to prevent globbing and word splitting.
    │   ╰───' more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"${WDL}"`?

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:465:9
    │
465 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:574:9
    │
574 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Since you double quoted this, it will not word split, and the loop will only run once.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:577:21
    │
577 │         for file in ~{sep(" ", bams)}
    │                     ^^^^^^^^^^^^^^^^^
    │                     │
    │                     SC2066[error]: Since you double quoted this, it will not word split, and the loop will only run once.
    │                     more info: https://www.shellcheck.net/wiki/SC2066
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:581:19
    │
581 │               ln -s $file
    │ ╭─────────────────────^
    │ │ ╭───────────────────'
582 │ │ │           bams+=" $(basename $file)"
    │ ╰─│─^ SC2086[info]: Double quote to prevent globbing and word splitting.
    │   ╰─' more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:582:32
    │
582 │           bams+=" $(basename $file)"
    │                                ^^^^^
    │                                │
    │                                SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:594:17
    │
594 │                 $bams
    │ ╭───────────────────^
    │ │ ╭─────────────────'
595 │ │ │     >>>
    │ ╰─│───^ SC2086[info]: Double quote to prevent globbing and word splitting.
    │   ╰───' more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$bams"`?

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:670:9
    │
670 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:746:9
    │
746 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:871:9
    │
871 │         let "n_cores -= 1"
    │         ^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/samtools.wdl:934:30
    │
934 │         if [ -z "$(gunzip -c ~{prefix}*.fastq.gz | head -c 1 | tr '\0\n' __)" ]; then
    │                              ^^^^^^^^^
    │                              │
    │                              SC2086[info]: Double quote to prevent globbing and word splitting.
    │                              more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"${WDLLbZ}"`?

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
     ┌─ /Users/afrantz/workflows/tools/samtools.wdl:1039:9
     │
1039 │         let "n_cores -= 1"
     │         ^^^^^^^^^^^^^^^^^
     │         │
     │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
     │         more info: https://www.shellcheck.net/wiki/SC2219
     │
     = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
     ┌─ /Users/afrantz/workflows/tools/samtools.wdl:1132:9
     │
1132 │         let "n_cores -= 1"
     │         ^^^^^^^^^^^^^^^^^
     │         │
     │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
     │         more info: https://www.shellcheck.net/wiki/SC2219
     │
     = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
     ┌─ /Users/afrantz/workflows/tools/samtools.wdl:1254:9
     │
1254 │         let "n_cores -= 1"
     │         ^^^^^^^^^^^^^^^^^
     │         │
     │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
     │         more info: https://www.shellcheck.net/wiki/SC2219
     │
     = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
     ┌─ /Users/afrantz/workflows/tools/samtools.wdl:1319:43
     │
1319 │         samtools faidx -o ~{outfile_name} $ref_fasta
     │                                           ^^^^^^^^^^
     │                                           │
     │                                           SC2086[info]: Double quote to prevent globbing and word splitting.
     │                                           more info: https://www.shellcheck.net/wiki/SC2086
     │
     = fix: did you mean `"$ref_fasta"`?

note[ShellCheck]: See if you can use ${variable//search/replace} instead.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:132:9
    │
132 │         echo ~{string} | sed 's/~{delimiter}/\n/g' > split_strings.txt
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2001[style]: See if you can use ${variable//search/replace} instead.
    │         more info: https://www.shellcheck.net/wiki/SC2001
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:719:83
    │
719 │         TOTAL_READS=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-total_reads $gen_stats_file | tail -n 1 | awk '{ printf("%.0f", $1) }')
    │                                                                                   ^^^^^^^^^^^^^^^
    │                                                                                   │
    │                                                                                   SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                   more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:720:94
    │
720 │         PERCENT_ALIGNED=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-percentage_aligned $gen_stats_file | tail -n 1 | awk '{ printf("%.3f", $1) }')
    │                                                                                              ^^^^^^^^^^^^^^^
    │                                                                                              │
    │                                                                                              SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                              more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:721:87
    │
721 │         MEAN_COVERAGE=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-mean_coverage $gen_stats_file | tail -n 1 | awk '{ printf("%.3f", $1) }')
    │                                                                                       ^^^^^^^^^^^^^^^
    │                                                                                       │
    │                                                                                       SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                       more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:722:90
    │
722 │         INSERT_SIZE=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-median_insert_size $gen_stats_file | tail -n 1)
    │                                                                                          ^^^^^^^^^^^^^^^
    │                                                                                          │
    │                                                                                          SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                          more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:723:82
    │
723 │         MEAN_GC_CONTENT=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-avg_gc $gen_stats_file | tail -n 1 | awk '{ printf("%.3f", $1) }')
    │                                                                                  ^^^^^^^^^^^^^^^
    │                                                                                  │
    │                                                                                  SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                  more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:724:93
    │
724 │         READ_LENGTH=$(csvcut -t -c ngsderive_mqc-generalstats-ngsderive-consensusreadlength $gen_stats_file | tail -n 1)
    │                                                                                             ^^^^^^^^^^^^^^^
    │                                                                                             │
    │                                                                                             SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                             more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:725:81
    │
725 │         PLATFORM=$(csvcut -t -c ngsderive_mqc-generalstats-ngsderive-instrument $gen_stats_file | tail -n 1)
    │                                                                                 ^^^^^^^^^^^^^^^
    │                                                                                 │
    │                                                                                 SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                 more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:727:83
    │
727 │         THIRTYX_PERCENT=$(csvcut -t -c QualiMap_mqc-generalstats-qualimap-30_x_pc $gen_stats_file | tail -n 1)
    │                                                                                   ^^^^^^^^^^^^^^^
    │                                                                                   │
    │                                                                                   SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                   more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:728:86
    │
728 │         DUP_PERCENT=$(csvcut -t -c FastQC_mqc-generalstats-fastqc-percent_duplicates $gen_stats_file | tail -n 1)
    │                                                                                      ^^^^^^^^^^^^^^^
    │                                                                                      │
    │                                                                                      SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                      more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Double quote to prevent globbing and word splitting.
    ┌─ /Users/afrantz/workflows/tools/util.wdl:730:86
    │
730 │         STRANDEDNESS=$({ csvcut -t -c ngsderive_mqc-generalstats-ngsderive-predicted $gen_stats_file || echo "Not Applicable" ; } | tail -n 1)
    │                                                                                      ^^^^^^^^^^^^^^^
    │                                                                                      │
    │                                                                                      SC2086[info]: Double quote to prevent globbing and word splitting.
    │                                                                                      more info: https://www.shellcheck.net/wiki/SC2086
    │
    = fix: did you mean `"$gen_stats_file"`?

note[ShellCheck]: Instead of 'let expr', prefer (( expr )) .
    ┌─ /Users/afrantz/workflows/tools/util.wdl:806:9
    │
806 │         let "lines = ~{reads_per_file} * 4"
    │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    │         │
    │         SC2219[style]: Instead of 'let expr', prefer (( expr )) .
    │         more info: https://www.shellcheck.net/wiki/SC2219
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/workflows/methylation/methylation-cohort.wdl:117:16
    │
117 │         python $(which combine.py) \
    │                ^^^^^^^^^^^^^^^^^^^
    │                │
    │                SC2046[warning]: Quote this to prevent word splitting.
    │                more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/workflows/methylation/methylation-cohort.wdl:160:16
    │
160 │         python $(which filter.py) \
    │                ^^^^^^^^^^^^^^^^^^
    │                │
    │                SC2046[warning]: Quote this to prevent word splitting.
    │                more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/workflows/methylation/methylation-cohort.wdl:202:16
    │
202 │         python $(which generate_umap.py) \
    │                ^^^^^^^^^^^^^^^^^^^^^^^^^
    │                │
    │                SC2046[warning]: Quote this to prevent word splitting.
    │                more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
    ┌─ /Users/afrantz/workflows/workflows/methylation/methylation-cohort.wdl:239:16
    │
239 │         python $(which plot_umap.py) --umap ~{umap} --output-name ~{plot_file}
    │                ^^^^^^^^^^^^^^^^^^^^^
    │                │
    │                SC2046[warning]: Quote this to prevent word splitting.
    │                more info: https://www.shellcheck.net/wiki/SC2046
    │
    = fix: address the diagnostic as recommended in the message

note[ShellCheck]: Quote this to prevent word splitting.
   ┌─ /Users/afrantz/workflows/workflows/methylation/methylation-preprocess.wdl:37:17
   │
37 │         Rscript $(which methylation-preprocess.R) \
   │                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   │                 │
   │                 SC2046[warning]: Quote this to prevent word splitting.
   │                 more info: https://www.shellcheck.net/wiki/SC2046
   │
   = fix: address the diagnostic as recommended in the message

Included in the above are both true and false positives as well as some with the misplaced Span.

@a-frantz
Copy link
Member Author

@thatRichman Just a poke in case you want to tackle this fix! No pressure though, one of us will get around to this eventually if you don't :)

@a-frantz a-frantz added the bug Something isn't working label Jan 22, 2025
@thatRichman
Copy link
Contributor

Ooh yikes, happy to take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants