Skip to content

Pretty-format JSON files#1864

Merged
ericof merged 3 commits intocookiecutter:mainfrom
kurtmckee:pretty-format-json
Jun 16, 2023
Merged

Pretty-format JSON files#1864
ericof merged 3 commits intocookiecutter:mainfrom
kurtmckee:pretty-format-json

Conversation

@kurtmckee
Copy link
Copy Markdown
Member

@kurtmckee kurtmckee commented Jun 16, 2023

This PR swaps out the existing check-json hook for the pretty-format-json hook, which will enforce standards on the JSON files, not simply confirm that they can be parsed.

I recommend visiting pre-commit.ci and enabling it for this repo. This will have the following benefits:

  • All PRs will be checked by pre-commit
  • Changes introduced by the linters will be added as an additional commit to all incoming PRs
  • Pre-commit hook versions will be regularly updated

This will reduce maintenance burden.

@kurtmckee kurtmckee changed the title Pretty format JSON files Pretty-format JSON files Jun 16, 2023
@ericof ericof self-assigned this Jun 16, 2023
@ericof ericof added code style This issue/PR relates to the project code style modification CI/CD This issue/PR relates to the project CI/CD update or fix. labels Jun 16, 2023
@ericof ericof added this to the 2.2.0 milestone Jun 16, 2023
Copy link
Copy Markdown
Member

@ericof ericof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest we use two instead of 4 for the indent.
(pre-commit is configured now)

@ericof
Copy link
Copy Markdown
Member

ericof commented Jun 16, 2023

@kurtmckee Now we need to fix the files :-)

@kurtmckee kurtmckee force-pushed the pretty-format-json branch from 97e9a52 to c809fa3 Compare June 16, 2023 18:23
@kurtmckee
Copy link
Copy Markdown
Member Author

@ericof Haha, I thought that pre-commit.ci would kick in because of the new commit so I took a shortcut. Maybe it skips PRs that are already open?

I'll watch for it on net-new PRs to show up as a CI action like the codecov/* CI checks. 👍

@luzfcb
Copy link
Copy Markdown
Contributor

luzfcb commented Jun 16, 2023

@kurtmckee I have approved your request to install the pre-commit ci integration for the cookiecutter repository. It is now available for use.

These are the other GitHub Apps we have installed.

image

In case you don't know me, I'm one of the maintainers of cookiecutter-django, but I don't maintain cookiecutter.

Anyway, thank you for the cleanup job you are doing on the issues/pull-requests.

@kurtmckee
Copy link
Copy Markdown
Member Author

Thank you both for the quick PR review, and for setting up pre-commit.ci! I think that'll reduce maintenance burden.

@ericof ericof self-requested a review June 16, 2023 21:29
@ericof ericof merged commit 6761ffd into cookiecutter:main Jun 16, 2023
@kurtmckee kurtmckee deleted the pretty-format-json branch June 16, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD This issue/PR relates to the project CI/CD update or fix. code style This issue/PR relates to the project code style modification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants