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

Casei precommit #549

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Casei precommit #549

wants to merge 4 commits into from

Conversation

naomatheus
Copy link
Collaborator

Whoops! Just opening this.

Summary:
Adds pre commit config and description and instructions

@naomatheus naomatheus self-assigned this Jun 16, 2023
Copy link
Contributor

@Tammo-Feldmann Tammo-Feldmann left a comment

Choose a reason for hiding this comment

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

@naomatheus I generally really like the idea of a pre-commit hook. I'm not convinced that we'd need to stand up a python virtual environment for this. I'd prefer to keep it all in javascript (although I have to admit that I don't have a very strong reason for this preference other than developer experience)

@naomatheus
Copy link
Collaborator Author

Hey @Tammo-Feldmann I was just seeing your comment on this. Totally makes sense.
I know the pre-commit hook will run when you commit, but if you want to run it manually I think you have to setup a virtual environment to be able to run that. But maybe there is a way to do that with JS, or just without a python virtual env.

The other option is don't run to pre-commit on your local machine, but you'll see the linting messages from pre-commit as they're omitted from the .git file scripts and repo. If pre-commit flags something, you won't have committed successfully and can run the linting "manually" without using a python pre-commit.

@Tammo-Feldmann
Copy link
Contributor

@naomatheus I only just saw your comment on this. Thank you for your thoughts and for pushing back. It's always good for me to think this through a bit more. I'm not sure understand why you'd want to run a pre-commit hook manually. Isn't it there to catch those things that we forget to run manually?
If there is something you'd like to do before your commits but not every time, wouldn't that best fit into a regular bash script (or even a one liner in the package.json)? I'm not opposed to having such a script or to committing it. Just wondering if that isn't a different purpose and might better stand alone.

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.

2 participants