-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
For bugs
- Rule Id SC2086
- My shellcheck version (
shellcheck --versionor "online"): online - The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
For new checks and feature suggestions
- https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
Maybe similar to "retryLimit appears unused" but its used.
Here's a snippet or screenshot that shows the problem:
#!/usr/bin/env bash
declare -i prefix_length=0
(( prefix_length += 17 )) #triggers SC2086 in next line
printf '%-*b\n' ${prefix_length} 'same string with long prefix'Here's what shellcheck currently says:
Line 7:
printf '%-*b\n' ${prefix_length} 'same string with long prefix'
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean: (apply this, apply all SC2086)
printf '%-*b\n' "${prefix_length}" 'same string with long prefix'Here's what I wanted or expected to see:
No error message
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels