Skip to content

When using shellcheck --format=json1, csgrep output is missing position information #138

@jamacku

Description

@jamacku

How to reproduce

shellcheck --format=gcc script.sh | csgrep
Error: SHELLCHECK_WARNING:
innocent-script.sh:6:1: warning[SC2034]: UNUSED_VAR appears unused. Verify use (or export if used externally).

shellcheck --format=json1 script.sh | csgrep
Error: SHELLCHECK_WARNING:
innocent-script.sh:6: warning[SC2034]: UNUSED_VAR appears unused. Verify use (or export if used externally).

Please notice the missing 1 in the second output:

- innocent-script.sh:6:1: warning[SC2034]: UNUSED_VAR appears unused. Verify use (or export if used externally).
+ innocent-script.sh:6: warning[SC2034]: UNUSED_VAR appears unused. Verify use (or export if used externally).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions