From 632001edc05b38287d9d58331d54a88d5581002f Mon Sep 17 00:00:00 2001 From: Jeremiah C Leary Date: Sat, 23 Dec 2017 17:26:12 -0600 Subject: [PATCH] Adding user documentation. --- docs/configuring.rst | 85 ++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 86 insertions(+) create mode 100644 docs/configuring.rst diff --git a/docs/configuring.rst b/docs/configuring.rst new file mode 100644 index 00000000..2aafbb82 --- /dev/null +++ b/docs/configuring.rst @@ -0,0 +1,85 @@ +Configuring +=========== + +Any attribute of any rule can be configured using the --configuration option and a JSON file. +This is the basic form of a configuration file: + +.. code-block:: json + + { + "rule":{ + "global":{ + "attributeName":"AttributeValue" + }, + "ruleId_ruleNumber":{ + "attributeName":"AttributeValue" + } + } + } + +Using **global** will set the attribute for every rule. +Each rule is addressable by using it's unique **ruleId** and **ruleNumber** combination. + +.. NOTE:: + If **global** and unique attributes are set at the same time, the unique attribute will take precedent. + + +Here are a list of attributes that can be altered: + ++-------------+--------------------------------------------------+ +| Attribute | Description | ++=============+==================================================+ +| indentSize | Sets the number of spaces for each indent level. | ++-------------+--------------------------------------------------+ +| phase | Sets the phase the rule will run in. | ++-------------+--------------------------------------------------+ +| disable | If set to True, the rule will not run. | ++-------------+--------------------------------------------------+ +| fixable | If set to False, the violation will not be fixed | ++-------------+--------------------------------------------------+ + +Example Configuration: Disabling a rule +--------------------------------------- + +Below is an example of a JSON file which disables the rule **entity_004** + +.. code-block:: json + + { + "rule":{ + "entity_004":{ + "disable":"True" + } + } + } + + +Example Configuration: Setting the indent increment size +-------------------------------------------------------- + +The indent increment size is the number of spaces an indent level takes. +It can be configured on an per rule basis... + +.. code-block:: json + + { + "rule":{ + "entity_004":{ + "indentSize":4 + } + } + } + +...or configured for every rule using **global**: + + +.. code-block:: json + + { + "rule":{ + "global":{ + "indentSize":4 + } + } + } + diff --git a/docs/index.rst b/docs/index.rst index 8e3b6f60..3edf5c57 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,5 +13,6 @@ Welcome to vhdl-style-guide's documentation! overview installing usage + configuring rules phases