VickiLanger / LGBTQ-of-the-day-bot

Twitter bot tweeting fun goofy lgbtq things and queer history of the day
https://twitter.com/LGBTQotd
GNU General Public License v3.0
82 stars 173 forks source link

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

Open bobsany16 opened 3 years ago

bobsany16 commented 3 years ago

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.

VickiLanger commented 3 years ago

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

bobsany16 commented 3 years ago

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 commented 3 years ago

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

VickiLanger commented 3 years ago

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

VickiLanger commented 3 years ago

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

bobsany16 commented 3 years ago

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 commented 3 years ago

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

bobsany16 commented 3 years ago

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

bobsany16 commented 3 years ago

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

VickiLanger commented 3 years ago

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 commented 3 years ago

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

VickiLanger commented 3 years ago

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.