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 'name-tests-test' to suggested pre-commit hooks #227

Closed
matthewfeickert opened this issue Jun 6, 2022 · 3 comments · Fixed by #231
Closed

Add 'name-tests-test' to suggested pre-commit hooks #227

matthewfeickert opened this issue Jun 6, 2022 · 3 comments · Fixed by #231
Assignees

Comments

@matthewfeickert
Copy link
Member

As we advocate for the use of pytest, the https://github.com/pre-commit/pre-commit-hooks hook name-tests-test might be a useful hook to add to the suggested hooks. Though as

Here is a minimal `.pre-commit-config.yaml` file with some handy options:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.2.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
```

is about a minimal configuration if the idea here is to add hooks that are agnostic to most other choices then I could make a PR to https://github.com/scikit-hep/cookie instead (if people think this is a good idea in either place I'll happily make a PR to wherever).

@henryiii
Copy link
Member

Maybe it would be better as a mention (+ cookie)? Though this is really not meant to be minimal, so I think I'd be okay with it in the standard set. There may be cases where this is customized, but those are likely existing packages & not good practice for a new package.

@henryiii
Copy link
Member

At this point adding something is a PR here, in cookie, and in repo-review. :)

@matthewfeickert
Copy link
Member Author

Maybe it would be better as a mention (+ cookie)?

Yeah my plan was to make a PR to cookie (and now repo-review) as well if you thought it was a good idea here.

Though this is really not meant to be minimal, so I think I'd be okay with it in the standard set.

👍

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 a pull request may close this issue.

2 participants