diff --git a/src/lib/parser-cov.cc b/src/lib/parser-cov.cc index b0b8be4c..a6f97d72 100644 --- a/src/lib/parser-cov.cc +++ b/src/lib/parser-cov.cc @@ -189,17 +189,19 @@ EToken ErrFileLexer::readNext() return T_UNKNOWN; } - // read file name, event, and msg - evt_.fileName = sm[/* file */ 1]; - evt_.event = sm[/* event */ 4]; - evt_.msg = sm[/* msg */ 5]; + // read file name + evt_.fileName = sm[/* file */ 1]; + if (evt_.fileName == "") + evt_.fileName.clear(); - // parse line number + // parse line/col evt_.line = parseInt(sm[/* line */ 2]); - - // parse column number evt_.column = parseInt(sm[/* col */ 3]); + // read event and msg + evt_.event = sm[/* event */ 4]; + evt_.msg = sm[/* msg */ 5]; + return T_EVENT; } diff --git a/tests/csgrep/0128-cov-parser-noloc-args.txt b/tests/csgrep/0128-cov-parser-noloc-args.txt new file mode 100644 index 00000000..7df3c951 --- /dev/null +++ b/tests/csgrep/0128-cov-parser-noloc-args.txt @@ -0,0 +1 @@ +--mode=json diff --git a/tests/csgrep/0128-cov-parser-noloc-stdin.txt b/tests/csgrep/0128-cov-parser-noloc-stdin.txt new file mode 100644 index 00000000..2fd4f265 --- /dev/null +++ b/tests/csgrep/0128-cov-parser-noloc-stdin.txt @@ -0,0 +1,346 @@ +Error: SHELLCHECK_WARNING (CWE-252): +./contrib/guide/get_started/00-cleanup.sh:6:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. + +Error: SHELLCHECK_WARNING (CWE-277): +./contrib/guide/get_started/12-datadir-create.sh:4:7: warning[SC2174]: When used with -p, -m only applies to the deepest directory. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:14:13: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:15:25: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:17:10: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:18:14: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:20:7: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:20:44: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./contrib/scripts/resetgnome:20:57: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING (CWE-398): +./contrib/template/.bash_profile:2:25: warning[SC1090]: ShellCheck can't follow non-constant source. Use a directive to specify location. + +Error: SHELLCHECK_WARNING: +./contrib/template/.bashrc:21:3: note[SC1091]: Not following: /soft/rko-modules/tcl/init/bash was not specified as input (see shellcheck -x). + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/bar-defaults.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/bar-loads.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/bar-switch.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh:6:6: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh:11:6: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING (CWE-569): +./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh:34:7: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. + +Error: SHELLCHECK_WARNING (CWE-563): +./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh:45:2: warning[SC2034]: GCCGNU appears unused. Verify use (or export if used externally). + +Error: SHELLCHECK_WARNING (CWE-563): +./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh:60:3: warning[SC2034]: AUTOFLAG appears unused. Verify use (or export if used externally). + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/foo-avail1.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/foo-avail2.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/foo-defaults.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/foo-loads.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/foo-switch.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/modavail.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING: +./doc/example/compiler-etc-dependencies/example-sessions/modversion.sh:3:8: note[SC2086]: Double quote to prevent globbing and word splitting. + +Error: SHELLCHECK_WARNING (CWE-569): +./doc/example/compiler-etc-dependencies/example-sessions/ompi-switch.sh.m431:4:7: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. + +Error: SHELLCHECK_WARNING (CWE-571): +./doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh:2:8: warning[SC2155]: Declare and assign separately to avoid masking return values. + +Error: SHELLCHECK_WARNING (CWE-670): +./doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh:2:23: warning[SC2128]: Expanding an array without an index only gives the first element. + +Error: SHELLCHECK_WARNING (CWE-571): +./doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh:3:8: warning[SC2155]: Declare and assign separately to avoid masking return values. + +Error: SHELLCHECK_WARNING (CWE-670): +./doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh:3:23: warning[SC2128]: Expanding an array without an index only gives the first element. + +Error: SHELLCHECK_WARNING (CWE-477): +./init/bash.in:27:47: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/bash.in:32:31: warning[SC2089]: Quotes/backslashes will be treated literally. Use an array. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/bash.in:41:9: warning[SC2090]: Quotes/backslashes in this variable will not be respected. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/bash_completion.in:10:15: error[SC1035]: You are missing a required space here. + +Error: SHELLCHECK_WARNING (CWE-477): +./init/bash_completion.in:10:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-477): +./init/bash_completion.in:22:20: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:52:25: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:68:27: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:69:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:70:25: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:72:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:74:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:75:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:76:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:89:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:90:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:94:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:96:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-398): +./init/bash_completion.in:105:21: warning[SC2178]: Variable was used as an array but is now assigned a string. + +Error: SHELLCHECK_WARNING (CWE-398): +./init/bash_completion.in:106:21: warning[SC2178]: Variable was used as an array but is now assigned a string. + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:108:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:109:33: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-829): +./init/bash_completion.in:116:4: warning[SC2091]: Remove surrounding $() to avoid executing output (or use eval if intentional). + +Error: SHELLCHECK_WARNING (CWE-563): +./init/bash_completion.in:118:34: warning[SC2034]: cmds appears unused. Verify use (or export if used externally). + +Error: SHELLCHECK_WARNING (CWE-563): +./init/bash_completion.in:118:39: warning[SC2034]: opts appears unused. Verify use (or export if used externally). + +Error: SHELLCHECK_WARNING (CWE-140): +./init/bash_completion.in:127:31: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + +Error: SHELLCHECK_WARNING (CWE-398): +./init/bash_completion.in:164:25: warning[SC2178]: Variable was used as an array but is now assigned a string. + +Error: SHELLCHECK_WARNING (CWE-398): +./init/bash_completion.in:165:25: warning[SC2178]: Variable was used as an array but is now assigned a string. + +Error: SHELLCHECK_WARNING (CWE-477): +./init/ksh.in:27:47: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/ksh.in:32:31: warning[SC2089]: Quotes/backslashes will be treated literally. Use an array. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/ksh.in:41:9: warning[SC2090]: Quotes/backslashes in this variable will not be respected. + +Error: SHELLCHECK_WARNING (CWE-156): +./init/profile.sh.in:10:23: warning[SC2046]: Quote this to prevent word splitting. + +Error: SHELLCHECK_WARNING (CWE-398): +./init/profile.sh.in:14:6: warning[SC1090]: ShellCheck can't follow non-constant source. Use a directive to specify location. + +Error: SHELLCHECK_WARNING: +./init/profile.sh.in:16:6: note[SC1091]: Not following: @initdir@/sh was not specified as input (see shellcheck -x). + +Error: SHELLCHECK_WARNING (CWE-477): +./init/sh.in:27:47: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/sh.in:32:31: warning[SC2089]: Quotes/backslashes will be treated literally. Rewrite using set/"$@" or functions. + +Error: SHELLCHECK_WARNING (CWE-569): +./init/sh.in:41:11: warning[SC2090]: Quotes/backslashes in this variable will not be respected. + +Error: SHELLCHECK_WARNING: +./init/sh.in:59:14: warning[SC3045]: In POSIX sh, export -f is undefined. + +Error: SHELLCHECK_WARNING: +./init/sh.in:60:14: warning[SC3045]: In POSIX sh, export -f is undefined. + +Error: SHELLCHECK_WARNING: +./init/sh.in:61:20: warning[SC3045]: In POSIX sh, type -t is undefined. + +Error: SHELLCHECK_WARNING: +./init/sh.in:62:17: warning[SC3045]: In POSIX sh, export -f is undefined. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:22:9: note[SC2016]: Expressions don't expand in single quotes, use double quotes for that. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:61:1: note[SC2162]: read without -r will mangle backslashes. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:63:6: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:102:9: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:107:10: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:127:12: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:148:11: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:153:10: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:164:12: note[SC2268]: Avoid x-prefix in comparisons as it no longer serves a purpose. + +Error: SHELLCHECK_WARNING (CWE-252): +./script/add.modules.in:190:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. + +Error: SHELLCHECK_WARNING (CWE-156): +./script/add.modules.in:199:7: warning[SC2046]: Quote this to prevent word splitting. + +Error: SHELLCHECK_WARNING: +./script/add.modules.in:199:7: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./script/commit-msg:49:6: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING (CWE-477): +./script/envml:83:15: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-477): +./script/envml:83:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. + +Error: SHELLCHECK_WARNING (CWE-88): +./script/envml:89:12: error[SC2068]: Double quote array expansions to avoid re-splitting elements. + +Error: SHELLCHECK_WARNING (CWE-563): +./script/envml:127:17: warning[SC2034]: module appears unused. Verify use (or export if used externally). + +Error: SHELLCHECK_WARNING (CWE-156): +./script/mkroot:75:37: warning[SC2046]: Quote this to prevent word splitting. + +Error: SHELLCHECK_WARNING: +./script/mkroot:75:37: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./script/mkroot:75:38: note[SC2012]: Use find instead of ls to better handle non-alphanumeric filenames. + +Error: SHELLCHECK_WARNING (CWE-156): +./script/mkroot:77:38: warning[SC2046]: Quote this to prevent word splitting. + +Error: SHELLCHECK_WARNING: +./script/mkroot:77:38: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./script/mkroot:77:39: note[SC2012]: Use find instead of ls to better handle non-alphanumeric filenames. + +Error: SHELLCHECK_WARNING (CWE-156): +./script/mkroot:88:30: warning[SC2046]: Quote this to prevent word splitting. + +Error: SHELLCHECK_WARNING: +./script/mkroot:88:30: note[SC2006]: Use $(...) notation instead of legacy backticked `...`. + +Error: SHELLCHECK_WARNING: +./script/mkroot:88:31: note[SC2012]: Use find instead of ls to better handle non-alphanumeric filenames. + +Error: SHELLCHECK_WARNING: +./script/mt:35:6: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING (CWE-456): +./script/mt:38:4: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string). + +Error: SHELLCHECK_WARNING (CWE-456): +./script/mt:42:1: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string). + +Error: SHELLCHECK_WARNING (CWE-88): +./script/mt:63:13: error[SC2068]: Double quote array expansions to avoid re-splitting elements. + +Error: SHELLCHECK_WARNING (CWE-88): +./script/mt:63:34: error[SC2068]: Double quote array expansions to avoid re-splitting elements. + +Error: SHELLCHECK_WARNING (CWE-140): +./script/mt:70:32: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. + +Error: SHELLCHECK_WARNING (CWE-140): +./script/mt:70:43: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. + +Error: SHELLCHECK_WARNING (CWE-140): +./script/mt:72:32: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. + +Error: SHELLCHECK_WARNING (CWE-140): +./script/mt:72:43: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. + +Error: SHELLCHECK_WARNING: +./script/mt:83:45: warning[SC2076]: Remove quotes from right-hand side of =~ to match as a regex rather than literally. + +Error: SHELLCHECK_WARNING (CWE-140): +./script/mt:84:26: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. + +Error: SHELLCHECK_WARNING: +./script/pre-commit:45:6: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING: +./script/pre-commit:47:9: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING: +./script/pre-commit:56:6: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING: +./script/pre-commit:80:6: note[SC2181]: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. + +Error: SHELLCHECK_WARNING: +: error[too-many]: 115 occurrences of note[SC2086] exceeded the specified limit 16 +./doc/example/compiler-etc-dependencies/example-sessions/ompi-defaults.sh:3:8: note: 99 occurrences of note[SC2086] were discarded because of this + +Error: SHELLCHECK_WARNING (CWE-140): +: error[too-many]: 29 occurrences of warning[SC2207] exceeded the specified limit 16 +./init/bash_completion.in:128:37: note: 13 occurrences of warning[SC2207] were discarded because of this diff --git a/tests/csgrep/0128-cov-parser-noloc-stdout.txt b/tests/csgrep/0128-cov-parser-noloc-stdout.txt new file mode 100644 index 00000000..7ddf38b8 --- /dev/null +++ b/tests/csgrep/0128-cov-parser-noloc-stdout.txt @@ -0,0 +1,1924 @@ +{ + "defects": [ + { + "checker": "SHELLCHECK_WARNING", + "cwe": 252, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/guide/get_started/00-cleanup.sh", + "line": 6, + "column": 1, + "event": "warning[SC2164]", + "message": "Use 'cd ... || exit' or 'cd ... || return' in case cd fails.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 277, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/guide/get_started/12-datadir-create.sh", + "line": 4, + "column": 7, + "event": "warning[SC2174]", + "message": "When used with -p, -m only applies to the deepest directory.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 14, + "column": 13, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 15, + "column": 25, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 17, + "column": 10, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 18, + "column": 14, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 20, + "column": 7, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 20, + "column": 44, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/scripts/resetgnome", + "line": 20, + "column": 57, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/template/.bash_profile", + "line": 2, + "column": 25, + "event": "warning[SC1090]", + "message": "ShellCheck can't follow non-constant source. Use a directive to specify location.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./contrib/template/.bashrc", + "line": 21, + "column": 3, + "event": "note[SC1091]", + "message": "Not following: /soft/rko-modules/tcl/init/bash was not specified as input (see shellcheck -x).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/bar-defaults.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/bar-loads.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/bar-switch.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh", + "line": 6, + "column": 6, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh", + "line": 11, + "column": 6, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh", + "line": 34, + "column": 7, + "event": "warning[SC2124]", + "message": "Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 563, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh", + "line": 45, + "column": 2, + "event": "warning[SC2034]", + "message": "GCCGNU appears unused. Verify use (or export if used externally).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 563, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/common_code.sh", + "line": 60, + "column": 3, + "event": "warning[SC2034]", + "message": "AUTOFLAG appears unused. Verify use (or export if used externally).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/foo-avail1.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/foo-avail2.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/foo-defaults.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/foo-loads.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/foo-switch.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/modavail.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/modversion.sh", + "line": 3, + "column": 8, + "event": "note[SC2086]", + "message": "Double quote to prevent globbing and word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/ompi-switch.sh.m431", + "line": 4, + "column": 7, + "event": "warning[SC2124]", + "message": "Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 571, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh", + "line": 2, + "column": 8, + "event": "warning[SC2155]", + "message": "Declare and assign separately to avoid masking return values.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 670, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/source-script-in-modulefile/bar-2.1/bar-setup.sh", + "line": 2, + "column": 23, + "event": "warning[SC2128]", + "message": "Expanding an array without an index only gives the first element.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 571, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh", + "line": 3, + "column": 8, + "event": "warning[SC2155]", + "message": "Declare and assign separately to avoid masking return values.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 670, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./doc/example/source-script-in-modulefile/foo-1.2/foo-setup.sh", + "line": 3, + "column": 23, + "event": "warning[SC2128]", + "message": "Expanding an array without an index only gives the first element.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash.in", + "line": 27, + "column": 47, + "event": "warning[SC2166]", + "message": "Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash.in", + "line": 32, + "column": 31, + "event": "warning[SC2089]", + "message": "Quotes/backslashes will be treated literally. Use an array.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash.in", + "line": 41, + "column": 9, + "event": "warning[SC2090]", + "message": "Quotes/backslashes in this variable will not be respected.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 10, + "column": 15, + "event": "error[SC1035]", + "message": "You are missing a required space here.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 10, + "column": 27, + "event": "warning[SC2166]", + "message": "Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 22, + "column": 20, + "event": "warning[SC2166]", + "message": "Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 52, + "column": 25, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 68, + "column": 27, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 69, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 70, + "column": 25, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 72, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 74, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 75, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 76, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 89, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 90, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 94, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 96, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 105, + "column": 21, + "event": "warning[SC2178]", + "message": "Variable was used as an array but is now assigned a string.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 106, + "column": 21, + "event": "warning[SC2178]", + "message": "Variable was used as an array but is now assigned a string.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 108, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 109, + "column": 33, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 829, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 116, + "column": 4, + "event": "warning[SC2091]", + "message": "Remove surrounding $() to avoid executing output (or use eval if intentional).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 563, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 118, + "column": 34, + "event": "warning[SC2034]", + "message": "cmds appears unused. Verify use (or export if used externally).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 563, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 118, + "column": 39, + "event": "warning[SC2034]", + "message": "opts appears unused. Verify use (or export if used externally).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 127, + "column": 31, + "event": "warning[SC2207]", + "message": "Prefer mapfile or read -a to split command output (or quote to avoid splitting).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 164, + "column": 25, + "event": "warning[SC2178]", + "message": "Variable was used as an array but is now assigned a string.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/bash_completion.in", + "line": 165, + "column": 25, + "event": "warning[SC2178]", + "message": "Variable was used as an array but is now assigned a string.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/ksh.in", + "line": 27, + "column": 47, + "event": "warning[SC2166]", + "message": "Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/ksh.in", + "line": 32, + "column": 31, + "event": "warning[SC2089]", + "message": "Quotes/backslashes will be treated literally. Use an array.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/ksh.in", + "line": 41, + "column": 9, + "event": "warning[SC2090]", + "message": "Quotes/backslashes in this variable will not be respected.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 156, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/profile.sh.in", + "line": 10, + "column": 23, + "event": "warning[SC2046]", + "message": "Quote this to prevent word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 398, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/profile.sh.in", + "line": 14, + "column": 6, + "event": "warning[SC1090]", + "message": "ShellCheck can't follow non-constant source. Use a directive to specify location.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/profile.sh.in", + "line": 16, + "column": 6, + "event": "note[SC1091]", + "message": "Not following: @initdir@/sh was not specified as input (see shellcheck -x).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 27, + "column": 47, + "event": "warning[SC2166]", + "message": "Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 32, + "column": 31, + "event": "warning[SC2089]", + "message": "Quotes/backslashes will be treated literally. Rewrite using set/\"$@\" or functions.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 569, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 41, + "column": 11, + "event": "warning[SC2090]", + "message": "Quotes/backslashes in this variable will not be respected.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 59, + "column": 14, + "event": "warning[SC3045]", + "message": "In POSIX sh, export -f is undefined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 60, + "column": 14, + "event": "warning[SC3045]", + "message": "In POSIX sh, export -f is undefined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 61, + "column": 20, + "event": "warning[SC3045]", + "message": "In POSIX sh, type -t is undefined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./init/sh.in", + "line": 62, + "column": 17, + "event": "warning[SC3045]", + "message": "In POSIX sh, export -f is undefined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 22, + "column": 9, + "event": "note[SC2016]", + "message": "Expressions don't expand in single quotes, use double quotes for that.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 61, + "column": 1, + "event": "note[SC2162]", + "message": "read without -r will mangle backslashes.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 63, + "column": 6, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 102, + "column": 9, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 107, + "column": 10, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 127, + "column": 12, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 148, + "column": 11, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 153, + "column": 10, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 164, + "column": 12, + "event": "note[SC2268]", + "message": "Avoid x-prefix in comparisons as it no longer serves a purpose.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 252, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 190, + "column": 1, + "event": "warning[SC2164]", + "message": "Use 'cd ... || exit' or 'cd ... || return' in case cd fails.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 156, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 199, + "column": 7, + "event": "warning[SC2046]", + "message": "Quote this to prevent word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/add.modules.in", + "line": 199, + "column": 7, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/commit-msg", + "line": 49, + "column": 6, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/envml", + "line": 83, + "column": 15, + "event": "warning[SC2166]", + "message": "Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 477, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/envml", + "line": 83, + "column": 31, + "event": "warning[SC2166]", + "message": "Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 88, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/envml", + "line": 89, + "column": 12, + "event": "error[SC2068]", + "message": "Double quote array expansions to avoid re-splitting elements.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 563, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/envml", + "line": 127, + "column": 17, + "event": "warning[SC2034]", + "message": "module appears unused. Verify use (or export if used externally).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 156, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 75, + "column": 37, + "event": "warning[SC2046]", + "message": "Quote this to prevent word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 75, + "column": 37, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 75, + "column": 38, + "event": "note[SC2012]", + "message": "Use find instead of ls to better handle non-alphanumeric filenames.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 156, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 77, + "column": 38, + "event": "warning[SC2046]", + "message": "Quote this to prevent word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 77, + "column": 38, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 77, + "column": 39, + "event": "note[SC2012]", + "message": "Use find instead of ls to better handle non-alphanumeric filenames.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 156, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 88, + "column": 30, + "event": "warning[SC2046]", + "message": "Quote this to prevent word splitting.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 88, + "column": 30, + "event": "note[SC2006]", + "message": "Use $(...) notation instead of legacy backticked `...`.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mkroot", + "line": 88, + "column": 31, + "event": "note[SC2012]", + "message": "Use find instead of ls to better handle non-alphanumeric filenames.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 35, + "column": 6, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 456, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 38, + "column": 4, + "event": "warning[SC2209]", + "message": "Use var=$(command) to assign output (or quote to assign string).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 456, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 42, + "column": 1, + "event": "warning[SC2209]", + "message": "Use var=$(command) to assign output (or quote to assign string).", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 88, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 63, + "column": 13, + "event": "error[SC2068]", + "message": "Double quote array expansions to avoid re-splitting elements.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 88, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 63, + "column": 34, + "event": "error[SC2068]", + "message": "Double quote array expansions to avoid re-splitting elements.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 70, + "column": 32, + "event": "warning[SC2206]", + "message": "Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 70, + "column": 43, + "event": "warning[SC2206]", + "message": "Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 72, + "column": 32, + "event": "warning[SC2206]", + "message": "Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 72, + "column": 43, + "event": "warning[SC2206]", + "message": "Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 83, + "column": 45, + "event": "warning[SC2076]", + "message": "Remove quotes from right-hand side of =~ to match as a regex rather than literally.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/mt", + "line": 84, + "column": 26, + "event": "warning[SC2206]", + "message": "Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/pre-commit", + "line": 45, + "column": 6, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/pre-commit", + "line": 47, + "column": 9, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/pre-commit", + "line": 56, + "column": 6, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "./script/pre-commit", + "line": 80, + "column": 6, + "event": "note[SC2181]", + "message": "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.", + "verbosity_level": 0 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "", + "line": 0, + "event": "error[too-many]", + "message": "115 occurrences of note[SC2086] exceeded the specified limit 16", + "verbosity_level": 0 + }, + { + "file_name": "./doc/example/compiler-etc-dependencies/example-sessions/ompi-defaults.sh", + "line": 3, + "column": 8, + "event": "note", + "message": "99 occurrences of note[SC2086] were discarded because of this", + "verbosity_level": 1 + } + ] + }, + { + "checker": "SHELLCHECK_WARNING", + "cwe": 140, + "language": "shell", + "tool": "shellcheck", + "key_event_idx": 0, + "events": [ + { + "file_name": "", + "line": 0, + "event": "error[too-many]", + "message": "29 occurrences of warning[SC2207] exceeded the specified limit 16", + "verbosity_level": 0 + }, + { + "file_name": "./init/bash_completion.in", + "line": 128, + "column": 37, + "event": "note", + "message": "13 occurrences of warning[SC2207] were discarded because of this", + "verbosity_level": 1 + } + ] + } + ] +} diff --git a/tests/csgrep/CMakeLists.txt b/tests/csgrep/CMakeLists.txt index f2b69bd3..8e622442 100644 --- a/tests/csgrep/CMakeLists.txt +++ b/tests/csgrep/CMakeLists.txt @@ -171,3 +171,4 @@ test_csgrep("0124-sarif-writer-imp" ) test_csgrep("0125-sarif-parser-bom" ) test_csgrep("0126-cov-parser-imp-flag" ) test_csgrep("0127-cov-writer-noloc" ) +test_csgrep("0128-cov-parser-noloc" )