Skip to content
New issue

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

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

Already on GitHub? # to your account

Update .pre-commit-config.yaml #991

Merged
merged 6 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pre-commit exclude skipping all files
  • Loading branch information
tomvothecoder committed Oct 26, 2023
commit 7e6bbe87582b1b5afffa62d4dc6fe00385fc670c
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration file for `pre-commit` tool.
# Source: https://pre-commit.com/#pre-commit-configyaml---top-level
exclude: "docs|node_modules|migrations|.git|.tox|.md|sample_setups/(external-setups|jsons)|tests/deprecated"
exclude: "docs|node_modules|migrations|.git|.tox|README.md|sample_setups/(external-setups|jsons)|tests/deprecated"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lee1043 and @acordonez, I isolated the issue of pre-commit skipping files to the .md substring in the exclude config. I'm not sure if pre-commit can handle file extensions or not (.tox is a not a file extension). I tried quickly Googling but didn't find any results.

I updated .md to README.md and now pre-commit runs locally and on CI/CD. Now pre-commit run --all-files picks up some issues that need to be fixed.

Let me know if pre-commit is working for you locally as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tomvothecoder this is also working locally for me now when I run pre-commit run --all-files. Thanks for looking into this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tomvothecoder thank you very much for figuring this out! At some point I added .md assuming it was for file extensions because I was annoyed by pre-commit complaining for extra space at the end of line in .md files. My bad. I appreciate you figured this out!

Copy link
Collaborator

@tomvothecoder tomvothecoder Oct 26, 2023

Choose a reason for hiding this comment

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

@acordonez and @lee1043 great and no problem!

Feel free to merge after you fix the new pre-commit issues. You can rebase your dev branches on the latest main to get pre-commit working again.

default_stages: [commit]
fail_fast: true