Open timidri opened 3 years ago
I guess JSON.parse is used here: https://github.com/voxpupuli/metadata-json-lint/blob/master/lib/metadata_json_lint.rb#L85 are you able to provide a fix for this? Or add a test that fails?
@bastelfreak I've raised a PR: https://github.com/voxpupuli/metadata-json-lint/pull/120 adding an acceptance test which should fail on invalid escape character. Though I am confused since my use case is a task metadata file, not a module metadata file. Hence the test does fail but due to invalid schema (it expects a module metadata file).
Describe the bug When a task metadata json file contains an invalid escape sequence, JSON linters (such as jq and Puppet Forge) raise an error but
pdk validate
does not flag that issue.To Reproduce Consider this task metadata
test.json
:pdk validate task
passes normally butjq
flags a problem:Expected behavior
pdk validate
raises the same error asjq
.Additional context
2.1