Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run automated fixes on Pull Request #220

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Jan 22, 2024

Follow-up to #217 . If this is accepted, the next step would be to sign-in on https://pre-commit.ci/ and connect it to this repo. (it's the CI autofixes version of https://pre-commit.com) .

Added autoformatting and basic linting fixes for YAML, JSON, Markdown and Python files.
As well as autofixes for mixed-line-ending, case-conflict trailing whitespaces and end-of-file newline.

You can run locally using:

  • pip install pre-commit to install
  • pre-commit run to run

You can run on all files using pre-commit run --all-files (see #221 for an initial run on all files)

Devs who enjoy pre-commit git hooks (I don't, some do), can also now use this as a pre-commit hook on their own accord using pre-commit install

Example run:
image

@Avasam Avasam mentioned this pull request Jan 22, 2024
@Avasam Avasam force-pushed the pre-commit.ci-automated-fixes branch from 98c6780 to b9fd734 Compare January 22, 2024 20:49
@Venomalia
Copy link
Owner

Venomalia commented Jan 31, 2024

I am not a fan of formatting the json files,
"Device": [[0.0, 512.0, 2048.0, 1536.0]]
you should use the same formatting as the
DolphinDynamicInputTextureCreator tool.

otherwise i don't see any problems and it would be a good thing to have, thanks for making the effort

@Venomalia Venomalia added the enhancement New feature or request label Jan 31, 2024
@Avasam
Copy link
Contributor Author

Avasam commented Jan 31, 2024

I'll see if I can, otherwise I'll just omit the formatter or use a different one.

Indent fixes are still relevant though.

I prefered showing you the possibility/difference it makes, then reverting if disliked.

@Avasam
Copy link
Contributor Author

Avasam commented Feb 9, 2024

@Venomalia The joys of an overly-opinionated formatter ^^ I excluded JSON files from the prettier hook and added a json formatting hook provided by pre-commit directly.

@Venomalia
Copy link
Owner

Looks good!
I guess I can merge it and then create a pre-commit hook.

@Venomalia Venomalia merged commit 5db417a into Venomalia:main Feb 23, 2024
@Avasam Avasam deleted the pre-commit.ci-automated-fixes branch February 23, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants