richpl / PyBasic

Simple interactive BASIC interpreter written in Python
GNU General Public License v3.0
170 stars 46 forks source link

GitHub Action to lint Python code #57

Closed cclauss closed 2 years ago

cclauss commented 3 years ago

Test results: https://github.com/cclauss/PyBasic/actions

bandit, codespell, flake8, mypy, pytest, and safety are all currently setup as mandatory tests.

Fixes a failing doctest: FlowSignal(ftype=FlowSignal.RETURN).ftarget is None, not -1

$ pytest --doctest-modules .

============================= test session starts ==============================
platform linux -- Python 3.10.0, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /home/runner/work/PyBasic/PyBasic
collected 2 items

flowsignal.py .                                                          [ 50%]
lexer.py .                                                               [100%]

============================== 2 passed in 0.07s ===============================
richpl commented 2 years ago

I agree that there is a lot of shoddy code out there and we should be encouraging people to properly test and validate their code, but I'm a little nervous about making all of those tools mandatory. At the end of the day, this is a hobbyist project and I don't want to raise the bar too high for people to contribute. I'm aware that I'm not familiar with the tools you have listed so this is partly my own ignorance talking here too.

I shall definitely check these tools out and get more familiar with them. But until then I'm nervous about mandating their use.

cclauss commented 2 years ago

Slim down to just a few tools