Dlint is a tool for encouraging best coding practices and helping ensure Python code is secure.
Maintained. Last release 6 weeks ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install dlintDlint
Dlint is a tool for encouraging best coding practices and helping ensure Python code is secure.
The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis. Even more valuable than the hundreds of serious bugs I have prevented with it is the change in mindset about the way I view software reliability and code quality.
For a static analysis project to succeed, developers must feel they benefit from and enjoy using it.
For documentation and a list of rules see docs.
Installing
$ python -m pip install dlint
And double check that it was installed correctly:
$ python -m flake8 -h
Usage: flake8 [options] file file ...
...
Installed plugins: dlint: 0.17.0, mccabe: 0.5.3, pycodestyle: 2.2.0, pyflakes: 1.3.0
Note the dlint: 0.17.0.
Using
Dlint builds on flake8 to perform its linting. This provides many
useful features without re-inventing the wheel.
CLI
Let's run a simple check:
$ cat << EOF > test.py
print("TEST1")
exec('print("TEST2")')
EOF
$ python test.py
TEST1
TEST2
$ python -m flake8 --select=DUO test.py
test.py:2:1: DUO105 use of "exec" is insecure
- Why is this insecure? To learn more visit .