Static analysis tools operate on our source code (static) vs. running program (dynamic). They help us maintain the quality of our source code by fixing formatting issues, spotting suspicious coding constructs, or alerting us to common errors. Here, I would recommend IDE Pycharm for Python project, this IDE is integrated with a lot of support of style checks.
To do this work, I started with a new branch git checkout -b staticTool
, and created a contributing.md
. Then, the Black library in Python was used for formatting and Pylint was used for linting.
After all these commits, using
git rebase main -i
git log
git commit --amend
Then I squashed the last 3 commits (squash) into the first one, updated the first commit message with --amend
option. At this stage. This branch was completed and ready to be merged to main
with
git checkout main
git merge staticTool
git push origin main
In summary, the final commit is here.
From my point of view, the most useful part is the Add a Linter
. With Pylint, the program can have a better code patterns and avoid making silly mistakes.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.