Skip to content

Commit

Permalink
Merge pull request #411 from KPilnacek/feature/add-precommit-config
Browse files Browse the repository at this point in the history
Add pre-commit config
  • Loading branch information
lukehinds committed Oct 29, 2018
2 parents abd08ed + f5a6f0c commit 8f4c216
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
@@ -0,0 +1,6 @@
- id: bandit
name: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
entry: bandit
language: python
types: [python]
19 changes: 18 additions & 1 deletion README.rst
Expand Up @@ -37,7 +37,7 @@ this Bandit processes each file, builds an AST from it, and runs appropriate
plugins against the AST nodes. Once Bandit has finished scanning all the files
it generates a report.

Bandit was originally developed within the OpenStack Security Project and
Bandit was originally developed within the OpenStack Security Project and
later rehomed to PyCQA.

Installation
Expand Down Expand Up @@ -249,6 +249,23 @@ Usage::
B703 django_mark_safe


Version control integration
---------------------------

Use `pre-commit <https://pre-commit.com/>`_. Once you `have it
installed <https://pre-commit.com/#install)>`_, add this to the
`.pre-commit-config.yaml` in your repository
(be sure to update `rev` to point to a real git tag/revision!)::

repos:
- repo: https://github.com/PyCQA/bandit
rev: '' # Update me!
hooks:
- id: bandit


Then run `pre-commit install` and you're ready to go.

Configuration
-------------
An optional config file may be supplied and may include:
Expand Down

0 comments on commit 8f4c216

Please sign in to comment.