Skip to content

Commit

Permalink
Add missing custom formatter doc (#406) (#421)
Browse files Browse the repository at this point in the history
* Add missing custom formatter doc (#406)

* Add custom.rst to docs source
* Fix custom formatter docstring
  • Loading branch information
nixphix authored and ericwb committed Nov 27, 2018
1 parent f475c67 commit fe1c116
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bandit/formatters/custom.py
Expand Up @@ -13,21 +13,25 @@
# License for the specific language governing permissions and limitations
# under the License.

r"""
"""
================
Custom Formatter
================
This formatter outputs the issues in custom machine-readable format.
default template: {abspath}:{line}: {test_id}[bandit]: {severity}: {msg}
default template: ``{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}``
:Example:
/usr/lib/python3.6/site-packages/openlp/core/utils/__init__.py: \
.. code-block:: none
/usr/lib/python3.6/site-packages/openlp/core/utils/__init__.py:\
405: B310[bandit]: MEDIUM: Audit url open for permitted schemes. \
Allowing use of file:/ or custom schemes is often unexpected.
.. versionadded:: 1.5.0
"""

import logging
Expand Down
5 changes: 5 additions & 0 deletions doc/source/formatters/custom.rst
@@ -0,0 +1,5 @@
------
custom
------

.. automodule:: bandit.formatters.custom

0 comments on commit fe1c116

Please sign in to comment.