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

Add pre-commit checks #22

Merged
merged 5 commits into from Jul 26, 2023
Merged

Add pre-commit checks #22

merged 5 commits into from Jul 26, 2023

Conversation

keirthana
Copy link
Collaborator

  • Add a pre-commit hook for inclusive naming check
  • Fix issues reported by the pre-commit hook

@keirthana keirthana linked an issue Jul 18, 2023 that may be closed by this pull request
README.rst Outdated
3. Navigate to the top-level directory of this repository and run ``pre-commit install --install-hooks``.
4. The following checks are run automatically before every commit:
- Inclusive naming checks (``woke``).
5. To ignore any violation reported by ``woke``, see `<https://docs.getwoke.tech/ignore/>`_.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The woke documentation is a bit vague in places. E.g. (1), it says you can ignore files by adding to your config file - but which file specifically? E.g. (2) Their in-line ignoring refers to a "following line" and then doesn't have a following line!

Some brief instructions here in our readme would be helpful, I think. Just the method for "ignore a whole file" and "ignore a line" should do it. If we have a preferred method for inline/nextline, we should pick one and present/stick to that to make sure that our docs are mutually consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I understand, the intention behind linking to the documentation was so that we don't have outdated instructions in case the woke decides to change something. I will add some preliminary ignoring instructions and then maybe redirect for more information.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good to me! Thanks :)

Copy link
Collaborator

@s-makin s-makin left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this. Will let Dominik review/merge to make sure I haven't overlooked anything.

Copy link
Collaborator

@dviererbe dviererbe left a comment

Choose a reason for hiding this comment

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

Praise: Nice addition, LGTM
Note: I will merge this once my 2 comments are addressed.

README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
@keirthana keirthana changed the title Add precommit checks Add pre-commit checks Jul 24, 2023
@keirthana keirthana force-pushed the add-precommit-checks branch 2 times, most recently from d37ecdd to eb8a27c Compare July 24, 2023 09:40
This is technically not needed as the `.pre-commit-config.yaml` file
specifies that woke only checks `.rst` files, but this may avoid
unwanted warnings/checks in the future if the config should chnage in
the future.
@dviererbe dviererbe merged commit 2260e1f into main Jul 26, 2023
3 checks passed
@dviererbe dviererbe deleted the add-precommit-checks branch July 26, 2023 07:06
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.

Set up pre-commit checks for this repository
3 participants