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

pre-commit: check in basic rules #817

Merged
merged 7 commits into from
Apr 9, 2022
Merged

Conversation

phillco
Copy link
Collaborator

@phillco phillco commented Apr 3, 2022

This begins the process of introducing automatic, required formatting as described in #816.

This PR just introduces the most minimum rules to start, which will apply to all files, including Talonscript:

  • mixed-line-ending (ensures consistent line endings, defaults to the most common in the repository)
  • trailing-whitespace (trims trailing whitespace)
  • end-of-file-fixer (every file should end with a newline)
  • check-merge-conflict (blocks if merge conflict markers are present, indicating a bad merge)

To avoid merge conflicts, this PR doesn't actually include the reformatting changes -- see this PR for what that would look like, but as described in #816, I think it'd be simplest if the maintainers just ran pre-commit run --all-files and pushed the fixes directly to master after merging this.

There would be a few extra steps needed by repository maintainers to add enforcement after this merges. Those are described in #816.

README.md Outdated Show resolved Hide resolved
@rntz rntz merged commit d69578e into talonhub:master Apr 9, 2022
purpleP pushed a commit to purpleP/knausj_talon that referenced this pull request Jun 27, 2022
* pre-commit: check in basic rules

* README: add pre-commit instructions

* README: update set up instructions

* change pre-commit hooks order

* README: update update because pre-commit.ci is not yet installed on knausj

* README: update

Co-authored-by: Michael Arntzenius <daekharel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants