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 a pre-commit hook to check for syntax errors #84

Open
bobsany16 opened this issue Oct 7, 2020 · 12 comments
Open

Add a pre-commit hook to check for syntax errors #84

bobsany16 opened this issue Oct 7, 2020 · 12 comments
Labels
enhancement New feature or request

Comments

@bobsany16
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Lots of times, entries to data files contain syntax errors like commas, periods, etc.,

Describe the solution you'd like
Have an automated pre-commit hook that will check for these errors. If there are, the hook won't allow a push => prompts contributors to check their changes.
This -> makes things easier for maintainer/organizer -> good practice of checking code for errors for everyone.

Additional context


Don't forget to follow the bot on Twitter to see the hard work you put in.

@bobsany16 bobsany16 added the enhancement New feature or request label Oct 7, 2020
@VickiLanger
Copy link
Owner

Oh! I had no clue that was something that could be done.

@bobsany16
Copy link
Collaborator Author

Yup! I've seen a couple projects implement multiple sorts of pre-commit hooks but unfortunately, I have 0 experience with this. Would be a blast to work on though 😅. Unless someone can chime in for this, I'll attempt.

@bobsany16
Copy link
Collaborator Author

I found this, I might try this, if that's cool with you

@VickiLanger
Copy link
Owner

Neat. I thought it was going to be some github actions type of thing. You're welcome to try it.

@VickiLanger
Copy link
Owner

If you haven't put too much work into the hooks. I think this python linter bot may do what we need

@bobsany16
Copy link
Collaborator Author

oh awesome! I was just still doing some researches on the hooks but unfortunately wasn't doing too good 😅 and the python linter bot does make things easier. I assume it will check for errors and then if it doesn't pass, we could request changes in the PR, right ? If so, I think this is more feasible. Thanks for letting me know!

@VickiLanger
Copy link
Owner

Um, I didn't look too hard yet. Just ran across it looking for something else

@bobsany16
Copy link
Collaborator Author

alright, I'll take a look and let you know!

@bobsany16
Copy link
Collaborator Author

Do you mind sharing the repo that uses this ? I just wanted to see their .yml file configurations.

@VickiLanger
Copy link
Owner

I found it in the GitHub actions page. I don't know of anyone specific who uses it. Though I'm sure many do use it

@lhfaguiar
Copy link
Contributor

have you guys figured something out? I'm looking for a way of making it stop failing at the same point every PR

@VickiLanger
Copy link
Owner

have you guys figured something out? I'm looking for a way of making it stop failing at the same point every PR

Personally, I haven't worked on it. Not sure if @bobsany16 has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants