Commit Graph

725 Commits

Author SHA1 Message Date
Matteo Delton 7bffafae0e
Fix typo and quote relativeFile (#1129)
"autodetect" is not accepted, while "autoDetect" is
Without quotes, an error is thrown if relativeFile contains spaces
2024-02-21 06:42:49 -06:00
dependabot[bot] 288a58d95e
Bump readthedocs-sphinx-search from 0.1.1 to 0.3.2 in /docs (#1099)
Bumps [readthedocs-sphinx-search](https://github.com/readthedocs/readthedocs-sphinx-search) from 0.1.1 to 0.3.2.
- [Changelog](https://github.com/readthedocs/readthedocs-sphinx-search/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/readthedocs/readthedocs-sphinx-search/compare/0.1.1...0.3.2)

---
updated-dependencies:
- dependency-name: readthedocs-sphinx-search
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 07:24:07 -06:00
Jeremiah Leary 3007a13c11
Issue#1096: Changing indentStyle to indent_style and indentSize to indent_size (#1115)
* Issue#1096:  Changing indentStyle to indent_style and indentSize to indent_size.

* Adding tests for rule deprecated options

* Adding test for global deprecated option.

* Adding test for groups.

* Added recursive function to check all leaves for deprecated options.

* Raise exception if indentSize or indentStyle detected in a configuration.

* Adding smart_tab tests.

* Fixing indent_type to indent_style.
2024-02-18 15:17:56 -06:00
JHertz5 4296031761
Issue#1127: Corrected formatting for code block in "Configuring Multiline Indent Rules" page. (#1128) 2024-02-15 21:17:44 -06:00
JHertz5 431cdb92c5
Issue#1117 Modifed initialisation of the `Rule` class's `name` and `identifier` attributes to reduce duplication. (#1118)
* Issue#1117 Modifed initialisation of the `Rule` class's `identifier` property to reduce duplication.

* Issue#1117 Modifed initialisation of the `Rule` class's `unique_id` property to make the `identifier` input redundant.

* Issue#1117: Updated Rule.name attribute to be initialised from the class's `__module__` variable.
Modified `deprecated_rule` to not initialise `name` and `identifier` attributes.
Modified rule_localized_001 to force the local rule's `name` since this can't be extracted from the module.
Modified test_rule to force Rule's `name`, `identifier` and `unique_id` in some tests.

* Issue#1117: Removed now-redundant name and identifier input arguments on rule `__init__` methods.
Updated rule_localized_001 to force the rule's name.
Update the local rules documentation.

* Issue#1117: Removed unused exception in get_rule_name.

* Issue#1117: Updates after merging master.

* Converting match case to if statement to support python pre version 3.10Converting match case to if statement to support python pre version 3.10.

---------

Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2024-02-04 15:23:23 -06:00
Jeremiah Leary 308bde1d2c
Issue#880 Adding tokeninzing, tokens and classifying documentation.
* Adding tokeninzing, tokens and classifying documentation.

* Minor grammar updates.

* Fixing build issues.

* Adding clarifying notes about status of documentation.
2024-02-01 20:57:43 -06:00
JHertz5 51a95c2096
Issue#1103: Adding structure rules for subprogram specifications. (#1108)
* Issue#1103 Added rule for multiline subprogram specification structure.

* Issue#1103 Added rule function_019.

* Issue#1103 Added rule procedure_013.

* Issue#1103 Restored inteface_list_semicolon to subprogram_specification rule.

* Issue#1103 Documentation updates.

* Issue#1103 Removal of superseded rules.

* Issue#1106 Added unittests for procedure_013.

* Issue#1106 Correction to subprogram specification strucutre to include other kinds of interface element

* Issue#1106 Added unittests for function_019.

* Issue#1106 Updated examples for rules function_019 and procedure_013.

* Issue#1106 Modified subprogram specification defaults to avoid changing existing styles.

* Issue#1103: Updated configuration documentation link for the multiline_subprogram_specification_structure class.

* Issue#1103: Updated default value for the `interface_element` attribute of `multiline_subprogram_specification_structure` rules to `add_new_line`

* Issue#1103: Corrected configuration documentation link for the multiline_subprogram_specification_structure class to be a string instead of a non-existent variable.

* Issue#1103: Corrected the link name for `configuring-procedure-call-statement-rules`.

* Issue#1103: Updated default value for the `interface_element` attribute of `multiline_subprogram_specification_structure` rules to `ignore`.

* Issue#1103: Updated default configuration of subprogram specification rules.

* Issue#1103: Updated JCL style with function_019 settings

* Adding picture to illustrate where options will take affect.

---------

Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2024-01-27 09:35:04 -06:00
Jeremiah Leary 4ff8b6a0e0
Issue#1107: Adding option to process_028 to allow for alignment of close parenthesis. (#1116) 2024-01-24 06:56:17 -06:00
Jeremiah Leary 1ba9088374
Issue#1081: Adding configuration option for constant_400 (#1094)
* Issue#1081:  Adding configuration option for constant_400

* Adding options to concurrent_400 and sequential_400.

* Refactored base rules to improve readability.

* Merging base rules:

  align_tokens_in_region_between_tokens_unless_between_tokens merged into align_tokens_in_region_between_tokens

* Adding ignore_single_line_aggregates to rule constant_400

* Removing commented out code.

* Refactoring align_tokens_in_region_between_token_when_between_tokens_unless_between_tokens.

* Removing unused alignment options due to refactor.
2024-01-21 13:55:08 -06:00
JHertz5 f03c32e02a
Issue#1112 Corrected list of disabled rules and added unit test to verify list. (#1113)
* Issue#1112 Added unit test for configuring disabled rules doc list of rules.

* Issue#1112 Updated list of rules in configuring disabled rules doc.

* Issue#1112 Cleared duplicate instances of lActual.

* Update configuring_disabled_rules.rst

Adding missing rules.

---------

Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2024-01-21 13:30:18 -06:00
JHertz5 bf66308e32
Issue#1110 Added rules to enforce prefixes and suffixes on generate/loop parameter indentifiers (#1111)
* Issue#1110 Added new rules for prefix/suffix enforcement on loop/generate parameter identifiers.

* Issue#1110 Documentation updates for the new loop/generate rules.

* Issue#1110 Added unit tests for the new loop/generate rules.

* Issue#1110 Documentation updates.
2024-01-21 13:02:00 -06:00
JHertz5 17bb03443a
Issue#1106 Corrections to procedure call docs. (#1109) 2024-01-21 12:42:40 -06:00
Jeremiah Leary dd644d442d
Issue#551: Fixing scoping of consistent token case rules. (#1052)
* Issue#551:  Fixing scoping of consistent token case rules.

Issue#755:
Issue#998:
Issue#1023

* Updating additional consistent case rules:

  1)  architecture_600
  2)  entity_600
2024-01-21 12:36:29 -06:00
JHertz5 c409e81998
Issue#1104 Corrected "superceeced" typo. (#1105) 2024-01-20 12:41:23 -06:00
JHertz5 e41bdd8855
Issue#1082: Adding assert rules to match report statement rules functionality. (#1083)
* Issue#1082 Added rules assert_100, assert_101, and assert_102 for whitespace in assert statements.

* Issue#1082 Added documentation for rules assert_100, assert_101, and assert_102.

* Issue#1082 Added tests for rules assert_100, assert_101, and assert_102.

* Issue#1082 Added missing comma to uppercase and lowercase rules page.

* Issue#1082 Added rules assert_500, assert_501, and assert_502 for keyword case in assert statements.

* Issue#1082 Added documentation for rules assert_500, assert_501, and assert_502.

* Issue#1082 Added tests for rules assert_500, assert_501, and assert_502.
2024-01-01 19:07:46 -06:00
JHertz5 7ad47019c3
Issue#1086: Corrected VHDL examples in "Configuring Multiline Indent Rules" (#1087)
* Issue#1086 Updated the configuring_multiline_indent_rules page to use the rule configuration example that is relevant to the VHDL examples given later on.

* Issue#1086 Updated the configuring_multiline_indent_rules page to correct the VHDL examples.

* Issue#1086 Updated the configuring_multiline_indent_rules page to remove trailing whitespace.
2024-01-01 18:48:42 -06:00
JHertz5 16298bfe66
Issue#1084: Updated docstring for `iteration_scheme_501`. (#1085)
* Issue#1084 Corrected error in docstring for iteration_scheme_501.

* Issue#1084 Updated iteration_scheme_rules_page to match autogenerated doc.

* Adding test for iteration_scheme documentation.

---------

Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2024-01-01 18:41:42 -06:00
JHertz5 296252942b
Issue#1076: procedure_call_003 modified to accept ignore_single_line option. (#1077) 2024-01-01 15:13:52 -06:00
Jeremiah Leary 18c3c4b8e7
Issue#1074: procedure_call_003 now includes sequential procedure calls. (#1075)
* Issue#1074:  procedure_call_003 now includes sequential procedure calls.

* Updating documentation to differentiate between concurrent_procedure_call_statement and procedure_call_statement.
2023-12-21 08:34:44 -06:00
Jeremiah Leary f7d0e77a04
Issue#1070: Adding exceptions option to prefix and suffix rules. (#1071) 2023-12-20 09:11:46 -06:00
Jeremiah Leary c7de28e77c
Issue#1065: Adding 'require_blank_line_unless_pragma' to blank line rules (#1068)
* Issue#1065:  Adding 'require_blank_line_unless_pragma' to blank line rules.

* Adding blank line rules for pragmas:

  * pragma_400
  * pragma_401
  * pragma_402
  * pragma_403

* Updating pragma documentation.

* Adding error checking on invalid pragma configurations.

* Fixing failing tests.
2023-12-17 16:59:55 -06:00
Jeremiah Leary 6d663af5f1
Issue#1047: Adding upper_or_lower option to case rules. (#1048) 2023-12-13 07:22:39 -06:00
Jeremiah Leary 33a209b9b1
Issue#1061: Updates for pragma use cases (#1063)
* Issue#1061:  Updates for pragma use cases

Pragmas are now treated as comments:

  *  Pragmas are now a subclass of comments
  *  Move rules will not move tokens if it crosses a pragma

* Fixing issue with expression classification causing infinite loop.
2023-12-12 06:41:06 -06:00
Jeremiah Leary e1282048bf
Issue 815 (#840)
* Updates for issue #815

Adding disabled rule constant_101

* Adding disabled rule variable_100

* Adding disabled rule signal_100

* Adding disabled rule alias_declaration_103.

* Adding disabled rule file_100.

* Adding disabled rule subtype_100.

* Adding disabled rule type_100.

* Adding rule signal_101.

* Adding rule signal_102.

* Adding more rules to enable correct aligment:

  1)  architecture_401
  2)  constant_200
  3)  signal_200
  4)  type_200

* Updated a couple of rules:

  1)  Added option to architecture_026 to optionally align type is keywords
  2)  Removed duplicate rule architecture_401
2023-12-09 08:03:07 -06:00
Jeremiah Leary 0096b7d87c
Issue#882: Moving rule concurrent_007 to conditional_waveforms_001. (#1049) 2023-12-09 08:00:40 -06:00
Jeremiah Leary 5c85734a07
Issue#1054: Adding classification of pragmas. (#1056)
* Issue#1054:  Adding classification of pragmas.

* fix 'keyError: regexp' by dStyle having parse regexp and dConfig not (#1058)

* Adding pragma configuration tests.

* Stopping pragma search if a match is found.

* Refactoring classifications of pragmas to improve performance.

---------

Co-authored-by: Gerard Sharp <43923557+SittingDuc@users.noreply.github.com>
2023-12-03 21:09:52 -06:00
Jeremiah Leary 7ba4904371
Issue#1053: Adding rule to check for reserved words. (#1055)
* Issue#1053:  Adding rule to check for reserved words.

* Removing unused token classes.

* Fixing documentation.
2023-12-01 07:41:39 -06:00
Jeremiah Leary 963da61b3a
Issue#924: Adding ability to check for camelCase and PascalCase. (#1037)
* Issue#924:  Adding ability to check for camelCase and PascalCase.

* Updating solution for camelCase and PascalCase.

* Removing unused base rule.

* Adding support for prefixes, suffixes and case exceptions.

* Refactored case_utils.py to reduce number of functions.

* Adding function mapping dictionaries to reduce the number of functions.

* Removing compare function.
2023-11-14 06:01:32 -06:00
Jeremiah Leary 3931a87a59
Issue#999: Adding rule constant_400 to align => in constant declarations. (#1039) 2023-11-06 16:06:27 -06:00
Alon Bar-Lev aeeeed6c27
alonbl patch series (#1017)
* Add linesep configuration option

Platform independent line ends are important to avoid conflicts.

Resolves: #1010
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Perform atomic write to files

Do not overwrite file as we may corrupt the file if something fails, instead
write into temporary location and move the result into the final destination.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Synchronize README command-line usage

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Support files as positional argument

Tools such as pre-commit and other tools expects the tools to accept the
input files as positional argument and not as options.

Let's support the two variants.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Support shallow git clone without tags

pre-commit uses shallow clone without tags, as this is not used to publish the
artifact, let's assume version '0' in this case.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Add pre-commit hooks support

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

---------

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2023-11-05 07:24:50 -06:00
JHertz5 be3aff48c1
Issue#1035 Correcting typos. (#1036) 2023-10-31 05:10:59 -05:00
Jeremiah Leary 74fadc7ae4
Issue 1033: Fixing classification of commas in selected_waveforms. (#1038)
* Issue#1033:  

* Removing unused classifier.

* Removing rule conditional_selected_signal_assignment_400

* Rule was conflicting with rule selected_assignment_400.

* Fixing issue with selected_assignments being considered an array.
2023-10-29 10:36:54 -05:00
Jeremiah Leary 92503eee82
Issue#1030: Adding option to indent use_clauses depending on existence of library_clause. (#1031)
* Issue#1030:  Adding option to indent use_clauses depending on existence of library_clause.

* Updates for codeclimate.

* Adding tests for new configuration option.

* Adding documentation.

* Fixing syntax error in documentation.
2023-10-27 17:01:57 -05:00
Jeremiah Leary f10aad231b
Issue#969: Updating use_clause rules for more user control. (#1025)
* Issue#969:  Updating use_clause rules for more user control.

* Fixing style issues.

* Fixing style issues.

* Adding documentation for new style.
2023-10-26 06:46:02 -05:00
Jeremiah Leary acb7de10d4
Issue#942: Moved rule instantiation_023 to port_map_010. (#958) 2023-10-24 16:34:13 -05:00
JHertz5 9a7f235c2d
Issue#1006: Minor documentation fixes (#1007)
* Issue#1006: Corrected code blocks in vim.rst.

* Issue#1006: Moved title to allow it to be found by reference.

* Issue#1006: Removed unused and incorrect link from links.rst.

* Issue#1006: Removed trailing whitespace from structure_optional_rule_group.rst

* Issue#1006: Corrected underline lengths in whitespace_rule_groups.rst
2023-10-24 16:31:48 -05:00
Jeremiah Leary 4e03d021b6
Issue#983: Adding concurent_selected_signal_assignment rules (#1024) 2023-10-23 06:45:02 -05:00
Jeremiah Leary 64882762e3
Issue#1009: Updating multiline alignment rules to accept booleans for paramters (#1018)
* Issue#1009:  Updating multiline alignment rules to accept booleans for parameters.

* Adding boolean to yes/no conversions for other rules.

* Converting rule after_002 to use yes/no strings for options.

* Updating base rule align_tokens_in_region_between_tokens_unless_between_tokens to use yes/no.

* Updating base rule align_tokens_in_region_between_tokens_skipping_lines_starting_with_tokens to accept yes/no.

* Updating base rule align_tokens_in_region_between_tokens to accept yes/no.

* Updating rule case_generate_statement_400 to accept yes/no.

* Updating rule concurrent_006 to accept yes/no.

* Fixing default value for generate_statement_ends_group in concurrent_006.

* Updating rule concurrent_008 to accept yes/no.

* Updating base rule align_tokens_in_region_between_tokens_when_between_tokens_unless_between_tokens to support yes/no

* Updating base rule align_tokens_in_region_between_tokens_unless_between_tokens to accept yes/no.

* Setting False options to 'no' in base rule align_tokens_in_region_between_tokens_unless_between_tokens.

* Updating block_comment rules to accept yes/no.

* Updating rule concurrent_400 to accept yes/no.

* Updating rule process_034 to accept yes/no.

* Updating rule process_035 to accept yes/no

* Updating rule process_400 to accept yes/no.

* Updating rule sequential_400 to accept yes/no.

* Updating rule subprogram_body_400 to accept yes/no.

* Updating rule concurrent_007 to accept yes/no.

* Updating rule library_003 to accept yes/no.

* Updating rule signal_012 to accept yes/no

* Updates for codeclimate issues.

* Moving similar alignment helper functions to utils file.

* Codeclimate updates.

* Updating option documentation to current standard.

* Changing default True option to 'yes'

* Updating configuration documentation to current standards.

* Updating configuration documentation to latest standard.

* Updating configuration rules to current standard.

* Replacing occurances of True/False with "yes"/"no"

* Updating configuration documentation to latest standard.

* Fixing documentation tests.
2023-10-22 06:46:42 -05:00
Jeremiah Leary 3d02e0b2c5
Issue-945: Adding rules for return_statement production (#1020) 2023-10-22 06:44:48 -05:00
Jeremiah Leary 4eac4c53c3
Issue#1008: Removing duplicate configuration documentation. (#1019) 2023-10-22 06:40:24 -05:00
Jeremiah Leary 6057e10792
Issue#1003: Adding case rules for subtype declarations. (#1004) 2023-10-09 16:51:27 -05:00
Alon Bar-Lev a35ff9691e
PR#1016: Support file configuration without scanning the file (#1016)
* Support file configuration without scanning the file

Currently per file configuration is specified under `file_list`, the
`file_list` has side effect of scanning the file regardless of what files
provided in command-line.

Configuration should be able to specify per file configuration without adding
the file to the scan.

New implementation will look for the file under `file_rules` and merge it to
the existing `file_list` configuration to keep backward compatibility.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>

* Adding tests for the new file_rules configuration option.

* Updating documentation for file_rules

* Removing trailing lines.

* Refactored configure_rules to improve readability.

---------

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2023-10-08 13:37:39 -05:00
Alon Bar-Lev 0dc4c35768
Use platform independent file name in configuration (#1015)
Current implementation searches the file as provided by user or glob, this
name may be platform specific.

New implementation will always use '/' as separator, enabling the same
configuration to be used in any platform.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2023-10-08 10:26:56 -05:00
Jeremiah Leary a3af59521a Attempting to fix readthedocs formatting. 2023-09-10 17:32:16 -05:00
JHertz5 92d966de5c
Issue#992: Added all optional item rules to `structure::optional` rule group. (#993)
* Issue#992: Added rules to structure::optional rule group.

* Issue#992: Updated documentation to reflect new structure::optional rule group rules.

* Issue#992: Updated/added tests to check new structure::optional rule group rules.

* Issue#992: Removed test files.

* Issue#992: Removed erroneous newline.
2023-09-08 15:41:39 -05:00
JHertz5 3181aee8f1
Issue#1001: Mistake in the documentation example for type_500 (#1002)
* Issue#1001: Fix case in violation example for type_500

* Issue#1001: Corrected case of type in violation example in rule_500.py
2023-09-08 14:58:47 -05:00
Seth Gower 3b6fc9eefb
Adds ability to read from standard input (#897)
* adds basic functionality to send file to stdin

* updates usage docs to reflect stdin and adds new vim editor configs

* Adds better handling with stdin. Safer checks

* removes output over stdout for vhdl file since that's out of scope

* shortens cmd line args line to pass that check on codeclimate

* removes trailing white space

* changes is to == to prevent warning

* updates vim rst to have the null ls config ignore stderr

When editing a file sometimes things can cause VSG to fail and print to
stderr. If this happens, without ignoring stderr it will create an error
message in nvim, which was obnoxious
2023-09-08 14:55:15 -05:00
Jeremiah Leary a31c83ac4d
Issue#975: Adding "remove" and "add" options to rule generate_011. (#989)
* Issue#975:  Adding "remove" and "add" options to rule generate_011.

* Fixing solution for remove option.
2023-08-07 18:34:50 -05:00
Jeremiah Leary 1430bcbd5d
Issue#976: Added prefix and suffix rules for function designators. (#987) 2023-08-07 18:34:01 -05:00
Jeremiah Leary 3697765cb0
Issue#952: Adding consistent case check for enumerated types. (#956) 2023-08-06 17:37:53 -05:00