Skip to content

Add a user-friendly message on how to fix jsonlint failures

What does this MR do and why?

As outlined in !98068 (comment 1244327608) the jsonlint output is not the most user-friendly. This MR enhances the lint-json.sh script to output a suggestion on how to fix the problematic files.

Screenshots or screen recordings

  EXECUTE > jsonlint
package.json is not pretty

Some of the JSON files are not pretty-printed, you can run:
        scripts/lint-json -f $(git diff --name-only master... | grep \\.json)
to fix them

How to set up and validate locally

  1. Create a commit that changes any JSON file in the repository in a way that's not pretty-printed
  2. bundle exec lefthook run pre-push

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports