Skip to content

Commit

Permalink
Fix README.rst (#365)
Browse files Browse the repository at this point in the history
The current README.rst has references to configure bandit runs using a custom
.INI-like file. In reality, that file should actually be a YAML file.
Using the INI example provided will result in:

` [main] ERROR bandit.cfg : Error parsing file. `

This patch set updates the configuration so it is of proper YAML format so
the execution will not error out.

Signed-off-by: Tin Lam <tinlam@gmail.com>

Co-authored-by: Luke Hinds <lukehinds@gmail.com>
Co-authored-by: Eric Brown <ericwb@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 25, 2022
1 parent 0d05d40 commit 68f43eb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,28 @@ An optional config file may be supplied and may include:

Per Project Command Line Args
-----------------------------
Projects may include a `.bandit` file that specifies command line arguments
that should be supplied for that project. The currently supported arguments
are:
Projects may include a YAML file named `.bandit` that specifies command line
arguments that should be supplied for that project. The currently supported
arguments are:

- targets: comma separated list of target dirs/files to run bandit on
- exclude: comma separated list of excluded paths
- skips: comma separated list of tests to skip
- tests: comma separated list of tests to run

To use this, put a .bandit file in your project's directory. For example:
To use this, put a YAML file named `.bandit` in your project's directory.
For example:

::

[bandit]
exclude: /test

::

[bandit]
tests: B101,B102,B301
tests:
- B101
- B102
- B301


Exclusions
Expand Down

0 comments on commit 68f43eb

Please sign in to comment.