Skip to content

Latest commit

 

History

History
185 lines (155 loc) · 11.1 KB

README.md

File metadata and controls

185 lines (155 loc) · 11.1 KB

Docs

Dlint uses a simple, folder-based hierarchy written in Markdown for documentation.

Linters

FAQs

Why not Bandit?

Bandit is another static analysis tool aimed at searching for security issues in Python code. Bandit is a great tool and can easily be used simultaneously with Dlint. However, there are a few advantages Dlint has over Bandit:

Bandit also provides some advantages over Dlint:

  • Bandit can identify SQL injections in your code: B608.
  • Bandit can identify security issues resulting from hardcoded information: B104, B105, B106, B107, and B108.

Running multiple security tools over your codebase will provide a more comprehensive analysis and ensure you're coding with confidence.

Where can I learn more about static analysis?

How can I integrate Dlint into XYZ?

TravisCI

Include Dlint in your .travis.yml configuration file:

language: python
install:
    - python -m pip install dlint
script:
    - python -m flake8 --select=DUO /path/to/code

CircleCI

Include Dlint in your .circleci/config.yml configuration file:

version: 2
jobs:
    build:
        docker:
            - image: circleci/python
        steps:
            - checkout
            - run: python -m pip install dlint
            - run: python -m flake8 --select=DUO /path/to/code

Gitlab

Include Dlint in your .gitlab-ci.yml configuration file:

stages:
    - test
test:
    image: python
    before_script:
        - python -m pip install dlint
    script:
        - python -m flake8 --select=DUO /path/to/code

Phabricator

Include Dlint in your Arcanist linting process via the .arclint configuration file:

{
    "linters": {
        "sample": {
            "type": "flake8"
        }
    }
}

Dlint rules will automatically be run via flake8 once it's installed, so the standard flake8 configuration will work. You can also utilize more granular control over the linting process:

{
    "linters": {
        "sample": {
            "type": "flake8"
        },
        "bin": ["python2.7", "python2"],
        "flags": ["-m", "flake8", "--select", "DUO"]
    }
}

How can I output results in JSON?

Use the flake8-json plugin:

$ python -m pip install flake8-json
$ python -m flake8 --format=json --select=DUO ...