tea-lang-org/tea-lang

Enforce style checks

MaLiN2223 opened this issue · 4 comments

As per our discussion in #51, this issue is to track enforcing style checkers.
I expect this to be done only on the new branch, the old code would stay as is.

I've been using Black, which is IMHO better than a style checker -- it simply forcibly re-formats your files. I think it does a nice job.

isort is also nice, enforcing style on imports.

Good call @emeryberger
I was personally using flake8 + autopep8 locally but black is also a viable option.

I would like to introduce 'no merge' policy for not formated commits. I think any pre-hook can be skipped when doing a PR, no?

emjun commented

I think we can use Github Actions to enforce style checks and reformatting.

We can also set conditions for when the actions should be skipped. Here is an example that skips based on the commit message.

Both require us to use YAML, and I'm fine with that.

Thoughts?

Closing in favour of #56