13 formatter linter on pull#19
Conversation
JustCallMeRay
left a comment
There was a problem hiding this comment.
Not bad, mostly small changes
…run only when linting return with success status, added setup.cfg for flake8 configuration
JustCallMeRay
left a comment
There was a problem hiding this comment.
small things again!,Looking good though!
| @@ -0,0 +1,4 @@ | |||
| [flake8] | |||
| max-line-length = 120 | |||
| exclude = | |||
There was a problem hiding this comment.
We should also exclude .git, pycache, .idea, .vs and .vscode as this will make it a little quicker. We should really add them all to a .gitignore but we'll do that in another ticket.
There was a problem hiding this comment.
/venv/ is excluded in .gitignore by default and it won't be tested by flake8 when in a container. The line has been removed.
There was a problem hiding this comment.
People will also want to run the formatter on their machines (to actually make changes), if we add all the excludes it will run a little quicker for them and hopefully not ruin random files (like those in git)
There was a problem hiding this comment.
Ok. Excluded unwanted directory in setup.cfg according to https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/python/linting/flake8.html
…in reqirements.txt for locally testing
Hi @JustCallMeRay
The below tasks are complete:
-[x] Have a formatter do a "dry run" (make no changes to the code but show up as a failed pipeline if a file requires formatting.
-[x] Have a linter do a dry run and fail the pipeline if any file requires changing
Please help check my work and let me know how it goes : ]
(Not sure if this is what you are looking for. I'm a little bit confused here. Seems like flake8 package does both the jobs, as linter and formatter, at the same time. It will dry run and report invalid formatting. Is something missing?)
Many thanks,