jamesg31 / TowerGame

PyGame Tower ATC simulation.
GNU General Public License v3.0
6 stars 1 forks source link

Linting GitHub Action #15

Open AdamJCavanaugh opened 3 years ago

AdamJCavanaugh commented 3 years ago
AdamJCavanaugh commented 3 years ago

@jamesg31 , do you just want black to format all files in the repo in the action? Or just report what files need changes and give a failure if changes are needed?

I'm running python -m black -h to see the available options, if you want to give input?

jamesg31 commented 3 years ago

Maybe just report on PR's? That might be better but I don't really understand how github actions works.

AdamJCavanaugh commented 3 years ago

GitHub Actions basically spin up a Docker image (I assume), which is defined in a yml file. It can run on various OS, based on various actions (push, pr, etc), and then do whatever you need...

So we could have an action that automatically re-formats files using black when someone opens a PR. Or automatically re-formats when we merge a PR. Perhaps the best one is to report issues with new files when a PR is opened or updated...

AdamJCavanaugh commented 3 years ago

I have no idea how to only get the updated files, frankly. There's some examples out there, but I don't want to use it without understanding it and... I don't understand it.

I'll plan to do a remote on any "failures" via black on any push or pr.

AdamJCavanaugh commented 3 years ago

Ugh, I pushed to master on accident, sorry. I think I need to tweak a little to get the action to show problems when there are changes black would make... currently it's a pass regardless.