Pretty up the formatter docs
* The formatter docs should use same sphinx tags as the plugins * The screen formatter was missing docs Change-Id: I8031644df5dc8469a00bdf7308f995810660744a
This commit is contained in:
parent
541dc8928f
commit
ce8530b3b6
@ -13,12 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
Description
|
||||
-----------
|
||||
=============
|
||||
CSV Formatter
|
||||
=============
|
||||
|
||||
This formatter outputs the issues in a comma separated values format.
|
||||
|
||||
Sample Output
|
||||
-------------
|
||||
:Example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
filename,test_name,test_id,issue_severity,issue_confidence,issue_text,
|
||||
|
@ -14,12 +14,14 @@
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
Description
|
||||
-----------
|
||||
==============
|
||||
HTML formatter
|
||||
==============
|
||||
|
||||
This formatter outputs the issues as HTML.
|
||||
|
||||
Sample Output
|
||||
-------------
|
||||
:Example:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -13,12 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
Description
|
||||
-----------
|
||||
==============
|
||||
JSON formatter
|
||||
==============
|
||||
|
||||
This formatter outputs the issues in JSON.
|
||||
|
||||
Sample Output
|
||||
-------------
|
||||
:Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
|
@ -13,6 +13,30 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
================
|
||||
Screen formatter
|
||||
================
|
||||
|
||||
This formatter outputs the issues as color coded text.
|
||||
|
||||
:Example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
>> Issue: [B301:blacklist_calls] Use of unsafe yaml load. Allows
|
||||
instantiation of arbitrary objects. Consider yaml.safe_load().
|
||||
|
||||
Severity: Medium Confidence: High
|
||||
Location: examples/yaml_load.py:5
|
||||
4 ystr = yaml.dump({'a' : 1, 'b' : 2, 'c' : 3})
|
||||
5 y = yaml.load(ystr)
|
||||
6 yaml.dump(y)
|
||||
|
||||
.. versionadded:: 0.9.0
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import datetime
|
||||
|
@ -14,12 +14,14 @@
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
Description
|
||||
-----------
|
||||
==============
|
||||
Text Formatter
|
||||
==============
|
||||
|
||||
This formatter outputs the issues as plain text.
|
||||
|
||||
Sample Output
|
||||
-------------
|
||||
:Example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
>> Issue: [B301:blacklist_calls] Use of unsafe yaml load. Allows
|
||||
|
@ -13,12 +13,14 @@
|
||||
# under the License.
|
||||
|
||||
r"""
|
||||
Description
|
||||
-----------
|
||||
=============
|
||||
XML Formatter
|
||||
=============
|
||||
|
||||
This formatter outputs the issues as XML.
|
||||
|
||||
Sample Output
|
||||
-------------
|
||||
:Example:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
|
5
doc/source/formatters/screen.rst
Normal file
5
doc/source/formatters/screen.rst
Normal file
@ -0,0 +1,5 @@
|
||||
------
|
||||
screen
|
||||
------
|
||||
|
||||
.. automodule:: bandit.formatters.screen
|
Loading…
x
Reference in New Issue
Block a user