You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
S003 counts a keyword only where it reads the start of a command, so dir SET a=1 and dir ^& SET a=1 no longer count SET. Dropping keywords can change the majority casing
For S003 a command starts after a separator, any unescaped parenthesis included, ELSE, DO, < or 2<, an IF condition, CALL, START with its switches and its title, the first quoted word, and cmd, %comspec% or !comspec!, by name or path, quoted or not, with /c, /k or /r. A comma, semicolon or = standing alone before a command is skipped
S003 reads ^& and ^| as separators in the command string of cmd /c or FOR /F and in an internal command that START runs, which a child cmd.exe runs, and glued switches such as cmd /d/c or cmd /cset, as cmd.exe does. There a ^) closes a block opened in the string
The string of FOR /F ends at the first unescaped ) in its set for S003, even after an unescaped (
After a line that ends in ^, S003 reads the next line's first caret as escaped where that line starts with an odd run of carets and & or |, so it counts SET in ^& SET and ^^^& SET
S003 now misses a command after if (a b) == x, if 1==1( or if defined=x, or after a %debug% prefix, among others. A word glued to @, as in @SET, is not counted, as before
Where START runs cmd, S003 reads one child cmd.exe, not two, so it no longer counts SET in start cmd /k dir ^^^| SET a=1. A quoted word after START's title is the program. cmd without /c, /k or /r runs none of its words, as in start /b cmd ^& SET a=1
S003 keeps the command string after a quoted cmd, so "cmd.exe" /c "SET a=1" counts SET. "C:\x\app.exe" /c "SET a=1" still does not