koalaman / shellcheck

ShellCheck, a static analysis tool for shell scripts
https://www.shellcheck.net
GNU General Public License v3.0
36.45k stars 1.78k forks source link

Ignoring a wrapped command #3086

Closed avidseeker closed 1 day ago

avidseeker commented 3 days ago

Consider the example:

# shellcheck ignore=2046
xrandr --verbose \
    $(for d in DP-1 DP-2 DP-3 HDMI-1 HDMI1; do
        echo --output "$d" --off
    done)

What I tried, as per https://www.shellcheck.net/wiki/SC1143 suggestions

xrandr --verbose \
    `# shellcheck ignore=2046` \
    $(for d in DP-1 DP-2 DP-3 HDMI-1 HDMI1; do
        echo --output "$d" --off
    done)
wileyhy commented 3 days ago

I believe the correct term for that directive is "disable." Wiley

On Fri, Nov 15, 2024, 15:34 avidseeker @.***> wrote:

Consider the example:

shellcheck ignore=2046

xrandr --verbose \ $(for d in DP-1 DP-2 DP-3 HDMI-1 HDMI1; do echo --output "$d" --off done)

What I tried, as per https://www.shellcheck.net/wiki/SC1143 suggestions

xrandr --verbose \ # shellcheck ignore=2046 \ $(for d in DP-1 DP-2 DP-3 HDMI-1 HDMI1; do echo --output "$d" --off done)

— Reply to this email directly, view it on GitHub https://github.com/koalaman/shellcheck/issues/3086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUF2F2ZIC7WQQXQ3SKALV732A2AJNAVCNFSM6AAAAABR4FC46SVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DGNBYGEZTONI . You are receiving this because you are subscribed to this thread.Message ID: @.***>