DEV Community

Qiwen Yu
Qiwen Yu

Posted on

Project Management: Static Analysis Tools

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)