Commit Graph

2616 Commits

Author SHA1 Message Date
Jukka Hertzog fe4d57d4e4
Issue#1330: Removed unused line from rule_601.py 2024-11-14 11:12:53 +00:00
Jukka Hertzog 10839d7c10
Issue#1330: Updated formatting in rule_600.py 2024-11-14 11:11:25 +00:00
Jukka Hertzog 38115813ac
Issue#1330: Update configuring_prefix_and_suffix_rules.rst 2024-11-14 11:05:15 +00:00
Jukka Hertzog 168501d64f
Issue#1330: Update unfixable_rules.rst 2024-11-14 11:02:56 +00:00
Jukka Hertzog f476959d48
Isue#1330 Update configuring_disabled_rules.rst 2024-11-14 11:01:51 +00:00
Jukka Hertzog d508e775f5
Issue#1330 Update naming_rule_group.rst 2024-11-14 11:00:40 +00:00
Jukka Hertzog 7bdfa76670
Issue#1330 Updated package_instantiation_rules.rst 2024-11-14 10:59:05 +00:00
Jukka Hertzog 27051dd201
Issue#1330 Added tests for new package instantiation naming rules. 2024-11-14 10:57:32 +00:00
Jukka Hertzog b820d1f914
#1330: Update __init__.py in package_instantiation. 2024-11-14 10:56:42 +00:00
Jukka Hertzog c6a090e40f
Issue#1330 Added rules for naming in package instantiations. 2024-11-14 10:55:39 +00:00
JHertz5 5b641012e3 Issue#1322: Added documentation for case rules for package instantiations. 2024-11-13 19:06:39 +00:00
JHertz5 510d158070 Issue#1322: Added tests for case rules for package instantiations. 2024-11-13 19:02:12 +00:00
JHertz5 d8b50f1213 Issue#1322: Added case rules for package instantiations. 2024-11-13 19:02:04 +00:00
Jukka Hertzog acdbbd81cb
Issue#1285: Added case rules for protected type declarations and bodies (#1293)
* Issue#1285: Added case rules for protected type declarations.

* Issue#1285: Added case rules for protected type body declarations.

* Issue#1285: Correction in protected_type_502

* Issue#1285: Added protected_type and protected_type_body to top-level rules object

* Issue#1285: Added tests for protected_type rules

* Issue#1285: Whitespace changes in test cases.

* Issue#1285: Updated protected_type tests.

* Issue#1285: Added tests for protected_type_body rules

* Issue#1285: Updated documentation for protected_type and protected_type_body rules.
2024-11-10 20:00:22 -06:00
Jukka Hertzog 9aaa274bd1
Issue#1284: Deprecate case_013 (#1312)
* Issue#1284: Deprecated rule case_013.

* Issue#1284: Updated tests for deprecated rule case_013.

* Issue#1284: Updated documentation for deprecated rule case_013.

* Issue#1284: Added punctuation to docstring.
2024-11-10 19:07:33 -06:00
Jukka Hertzog 5f4725dba1
Issue#1281: Typo corrections (#1282) 2024-11-10 07:55:57 -06:00
Jukka Hertzog c65927224b
Issue#1304: Corrected misplaced classification tests (#1305)
* Issue#1304: Moved classification test inputs. Added interfaces to let parser not crash in clauses

* Issue#1304: Added expected results for new classification tests.

* Issue#1304: Updated port clause expected result.
2024-11-10 07:47:03 -06:00
Jukka Hertzog 571bc52927
Issue#1251: Added rules to enforce case on parameters in functions and procedures (#1254)
* Issue#1251: Added rules function_507, procedure_508, and procedure_call_502.

* Issue#1251: Updated docstrings and docs for rules function_507, procedure_508, and procedure_call_502.

* Issue#1251: Updated docstrings and docs for rule groups.

* Issue#1251: Updated docstrings and docs for rule groups.

* Issue#1251: Updated expected test output.

* Issue#1251: Updated expected test output.

* Issue#1251: Added tests for rules function_507, procedure_508, and procedure_call_502.

* Issue#1251: Added rules function_508 and procedure_509.

* Issue#1251: Updated docs for function_508 and procedure_509.

* Issue#1251: Updated rule group docs for function_508 and procedure_509.

* Issue#1251: Minor consistency improvement.

* Issue#1251: Removed unused imports.

* Issue#1251: Corrected rules function_507 and procedure_508 to act on interface file declarations

* Issue#1251: Improved tests for function_507 and procedure_508

* Issue#1251: Updated get_function_subprogram_body and get_procedure_subprogram_body to handle nested declarations

* Issue#1251: Updates to consistent_subprogram_parameter_token_case. Still doesn't exclude nested regions unfortunately, but at least handles them perhaps satisfactorily.

* Issue#1251: Added tests for function_508 and procedure_509.

* Issue#1251: Removed unused code.

* Issue#1251: Formatting

* Issue#1251: Updated style tests.

* Issue#1251: Cleanup in consistent_subprogram_parameter_token_case

* Issue#1251: Fixed crash in case of subprogram with no interfaces.

* Issue#1251: Updated test file to exercise corner case

* Issue#1251: Updated test file to exercise corner case

* Issue#1251: Updated test file to exercise corner case

* Issue#1251: Updated test file to exercise corner case

* Issue#1251: Removed consistent case changes, to be split into a different PR.
2024-11-10 07:36:31 -06:00
Jukka Hertzog 83bfcfd9d3
Issue#1267: Updated rule return_statement_300 to handle label alignment (#1268)
* Issue#1267: Updated rule return_statement_300 to handle label alignment

* Issue#1267: Removed extra newline from indent_config.yaml

* Issue#1267: Split return label rule out to return_statement_301.

* Issue#1267: Reverted return_statement_300 tests.

* Issue#1267: Added tests for return_statement_301.

* Issue#1267: Added documentation for return_statement_301.
2024-11-09 14:18:19 -06:00
Jukka Hertzog 44544d3060
Issue#1253: Added rule to enforce case of `pure` and `impure` keywords. (#1259)
* Issue#1253: Added rule function_510.

* Issue#1253: Added tests for rule function_510.

* Issue#1253: Updated documentation for rule function_510.

* Issue#1253: Updated documentation for rule function_510.

* Issue#1253: Changed rule function_510 to function_509 to avoid conflict with other in-progress branches.

* Issue#1253: Updated test script.

* Issue#1253: Adjusted whitespace in test files for consistency with other tests.

* Issue#1253: Split rules to act on pure and impure separately.
2024-11-09 14:14:49 -06:00
Jukka Hertzog 980b7cfc74
Issue#1228: Added subtype rules to match type rules (#1229)
* Issue#1228: Added rules subtype_005 and subtype_006.

* Issue#1228: Added test for rule subtype_005.

* Issue#1228: Added test for rule subtype_006.

* Issue#1228: Added rules subtype_007 and subtype_008.

* Issue#1228: Added tests for rules subtype_007 and subtype_008.

* Issue#1228: Added rules subtype_009 and subtype_010.

* Issue#1228: Added tests for rules subtype_009 and subtype_010.

* Issue#1228: Added rule subtype_200.

* Issue#1228: Fixed rule subtype_200.
Removed duplicates from lTokens and lAllowTokens.
Updated code example to avoid duplicate definitions.

* Issue#1228: Added tests for rule subtype_200.

* Issue#1228: Corrections/improvements to new rule docstrings.

* Issue#1228: Reworked rule numbers to reflect execution phases.

* Issue#1228: Updated rule documentation.

* Issue#1228: Updated documentation.

* Issue#1228: Updated rule subtype_102 to include resolution functions.

* Issue#1228: Simplified subtype_102 by using whitespace_after_token instead of whitespace_between_token_pairs.

* Issue#1228: Simplified subtype_101 by using whitespace_before_token instead of whitespace_between_token_pairs.

* Issue#1228: Corrected order of init imports for subtypes.

* Issue#1228: Corrected order of init imports for subtypes.
2024-11-09 14:07:20 -06:00
Jeremiah Leary dd64777650 Fixing tox style errors. 2024-10-20 18:35:25 -05:00
Jeremiah Leary 5ca843011c Adding vhdl productions speadsheet. 2024-10-20 18:26:07 -05:00
JHertz5 c14c303097
Issue#1277: Rule for enforcing case on `others` in case statements. (#1278)
* Issue#1277: Added rule case_500.

* Issue#1277: Added tests for rule case_500.

* Issue#1277: Added documentation for rule case_500.
2024-10-20 17:32:01 -05:00
JHertz5 2c60191df3
Issue#1252: Rules for enforcing case on function and procedure parameter directions (#1260)
* Issue#1252: Added rules function_509 and procedure_510.

* Issue#1252: Changed rule function_509 to function_510.

* Issue#1252: Added tests for rules function_509 and procedure_510.

* Issue#1252: Updated documentation for rules function_510 and procedure_510.
2024-10-20 17:07:07 -05:00
JHertz5 6a58dfc469
Issue#1256: Updated PascalCase and camelCase regexes to allow a single uppercase letter at the end of the name (#1257)
* Issue#1256: Updated PascalCase and CamelCase regexes to allow a single uppercase letter at the end of the name.

* Issue#1256: Updated tests to check that PascalCase and CamelCase regexes allow a single uppercase letter at the end of the name.
2024-10-20 15:53:19 -05:00
JHertz5 150c4d6700
Issue#1263: Rules for enforcing case on parameter class in functions and parameters (#1264)
* Issue#1263: Added rules function_511 and procedure_511.

* Issue#1263: Added tests for rules function_511 and procedure_511.

* Issue#1263: Removed duplicate token in rules function_511 and procedure_511.

* Issue#1263: Updated docstring for rules function_511 and procedure_511.

* Issue#1263: Updated docs for rules function_511 and procedure_511.
2024-10-20 10:52:38 -05:00
JHertz5 44fd761232
Issue#1265: Added rules for next statements (#1266)
* Issue#1265: Added rules next_statement_300, next_statement_500 and next_statement_501.

* Issue#1265: Added tests for rules next_statement_300, next_statement_500 and next_statement_501.

* Issue#1265: Added docs for rules next_statement_300, next_statement_500 and next_statement_501.

* Issue#1265: Update rule next_statement_300 to handle label alignment as well.

* Issue#1265: Updated indent rule group test.

---------

Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
2024-10-20 10:31:58 -05:00
JHertz5 3d3835a08d
Issue#1275: Added rules for library names in entity instantiations (#1276)
* Issue#1275: Added rule instantiation_500.

* Issue#1275: Added tests for rule instantiation_500.

* Issue#1275: Added documentation for rule instantiation_500.

* Issue#1275: Reverted IEEE rule doc change.

* Issue#1275: Removed excess newline in docstring/documentation.
2024-10-20 10:31:19 -05:00
JHertz5 afb9a1d56e
Issue#1269: Rule to enforce case on exit statements (#1270)
* Issue#1269: Added rules exit_statement_300, exit_statement_500 and exit_statement_501.

* Issue#1269: Added tests for rules exit_statement_300, exit_statement_500 and exit_statement_501.

* Issue#1269: Added docs for rules exit_statement_500 and exit_statement_501.
2024-10-20 10:11:50 -05:00
JHertz5 78c4c5deb6
Issue#1261: Rules for enforcing case in wait statements (#1262)
* Issue#1261: Added rules wait_500, wait_501, wait_502 and wait_503.

* Issue#1261: Added tests for rules wait_500, wait_501, wait_502 and wait_503.

* Issue#1261: Added documentation for rules wait_500, wait_501, wait_502 and wait_503.
2024-10-20 09:47:20 -05:00
JHertz5 d57c9c186b
Issue#1273: Added rules to enforce `in` keywords in for loops/generates (#1274)
* Issue#1273: Added rules for_generate_statement_502 and iteration_scheme_502.

* Issue#1273: Added tests for rules for_generate_statement_502 and iteration_scheme_502.

* Issue#1273: Added documentation for rules for_generate_statement_502 and iteration_scheme_502.
2024-10-20 09:03:37 -05:00
JHertz5 32ff55eb6a
Issue#1271: Added rules for null statements (#1272)
* Issue#1271: Added rules null_statement_300 and null_statement_500.

* Issue#1271: Added tests for rules null_statement_300 and null_statement_500.

* Issue#1271: Added documentation for rules null_statement_300 and null_statement_500.
2024-10-19 11:02:15 -05:00
Jeremiah Leary db548fdbdb
Issue#1245: Fixing documentation issue around regex. (#1246) 2024-10-14 20:47:44 -05:00
JHertz5 33a2ae7559
Issue#1241: Reduced duplication in token classification tests (#1242)
* Issue#1241: Added meta test that tests all token classifications available.

* Issue#1241: Added classification result for resolution indications.

* Issue#1241: Removed now-redundant test files.

* Issue#1241: Formatting update.

* Issue#1236: Improved LRM name list acquisition.

* Issue#1241: Updated class names for consistency.

* Issue#1241: Improved safety of automated test name generation.

* Issue#1241: Simplified function name.

* Issue#1241: Duplication reduction.

* Issue#1241: Efficiency improvement.

* Issue#1241: Refactored code to be more clean by using pathlib's features.

* Issue#1241: Formatting.

* Issue#1241: Delete tests/vhdlFile/test_bit_string_literal.py, which now duplicates test_token.py.
2024-10-13 18:54:13 -05:00
JHertz5 124be04fec
Issue#1243: Fixed external names parsing bug (#1244)
* Issue#1243: Updated external name classification_test_input.vhd to expose bug.

* Issue#1243: Updated classification_results.txt to match desired output

* Issue#1243: Updated external_signal_name.py to fix bug.

* Issue#1243: Updated external_variable_name.py to fix bug.

* Issue#1243: Updated external_constant_name.py to fix bug.

* Issue#1243: Fixed external_variable_name.py.

* Issue#1243: Minor simplification in external name classification

* Issue#1243: Minor simplification in external name classification

* Issue#1243: Minor simplification in external name classification
2024-10-13 08:45:43 -05:00
JHertz5 ce86655850
Issue#1236: Rule for case in hexadecimal constants and base specifier (#1237)
* Issue#1236: Updated parser to recognise bit string literals.

* Issue#1236: Added rules bit_string_literal_500 and bit_string_literal_501.

* Issue#1236: Updated bit string literal tokens to combine quote tokens into bit_value string token.

* Issue#1236: Updated case_utils to add exeption for bit string literals.

* Issue#1236: Updated parser to separate bit_string_literal integer token from bit_string_literal base_specifier token.

* Issue#1236: Added test for bit_string_literal classification.

* Issue#1236: Added test for bit_string_literal_500.

* Issue#1236: Added test for bit_string_literal_501.

* Issue#1236: Updated rules and rule tests.

* Issue#1236: Style updates.

* Issue#1236: Updated classification result.

* Issue#1236: Changed bit_string_literal_501 to default to upper case.

* Issue#1236: Updated tests for bit_string_literal_501 default to upper case change.

* Issue#1236: Formatting changes.

* Issue#1236: Updated fixed versions of code examples.

* Issue#1236: Updated fixed versions of code examples.

* Issue#1236: Code refactoring to reduce duplication.

* Issue#1236: Code refactoring to improve names and remove unused code.

* Issue#1236: Formatting changes.

* Issue#1236: Refactored code to reduce congitive complexity.

* Issue#1236: Refactored code to reduce congitive complexity.

* Issue#1236: Added bit string literal rules to top-level rules documentation.

* Issue#1236: Used compiled regular expressions to improve bit_string_literal parsing.

* Issue#1236: Changed regex strings to raw strings to avoid warnings about invalid escape sequences.

* Issue#1236: Removed unused import.
2024-10-07 20:09:53 -05:00
JHertz5 8174cab017
Issue#1230: Updated documentation with corrections. (#1231) 2024-10-02 21:52:52 -05:00
Jeremiah Leary da84a1be1f
Issue#1170: Adding rules to enforce spaces before generic map and port map assignment operators. (#1173)
* Issue#1170:  Adding rules to enforce spaces before generic map and port map assignment operators.

* Adding ability to parse external names.

  1)  Added parsing of external names
  2)  Added external_signal_name rules

* Adding parsing of external names to productions.

* Fixing rule identifiers.

* Adding external_constant_name rules.

* Adding external_variable_name rules.

* Adding classification of indexes of external names.

* Style issue updates and fixing test.
2024-10-02 21:47:19 -05:00
Jeremiah Leary 7c345ebba1
Issue#1207: Fixing default values in multiline indent documentation. (#1208) 2024-09-22 20:46:58 -05:00
Alon Bar-Lev cd881588e5
vsg: print file name when ClassifyError (#1210)
In current implementation the user see something like the following when
ClassifyError is raised:

    Error: Unexpected token detected while parsing procedure_call_statement @ Line 49, Column 22 in file None
           Expecting : ;
           Found     : )

In a project that contains multiple files, the user is clueless as he does not
know which of the files caused the error.

This change adds the name of the file to the message.

    Error while processing xxx:
    Error: Unexpected token detected while parsing procedure_call_statement @ Line 49, Column 22 in file None
           Expecting : ;
           Found     : )

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2024-09-22 20:45:46 -05:00
JHertz5 7f51f89dce
#Issue1212: VSG crashes when encountering generate statement corner case. (#1222)
* Issue#1212: Corrected order of operations in extract_pairs to ensure that it does not return an empty list as one of the pairs.

* Issue#1212: Updated the tests to exercise failure case that raised this isssue.

* Issue#1212: Updated extract_indexes_from_pairs to strip any empty pairs from the input list.
2024-09-21 21:40:13 -05:00
JHertz5 2968a5efb9
Issue#1214: Corrected label tag for _configuring-port-map-new-line. (#1215) 2024-09-08 20:06:00 -05:00
JHertz5 7788d41f85
Issue#1216: Added escape characters for "**" in docs. (#1217)
* Issue#1216: Added escape characters for "**" in docs.

* Issue#1216: Updated rule docstring in whitespace_011

* Issue#1216: Correction to whitespace_011 docstring.
2024-09-08 20:01:16 -05:00
JHertz5 82ee7a9f16
Issue#1223: Declared regex patterns as raw strings rather than Unicode strings to avoid interpretation as an escape sequence. (#1224) 2024-09-08 19:57:49 -05:00
JHertz5 c5bf334136
Issue-1225 vsg_rule_doc_gen script does not run. (#1226)
* Issue#1225: Corrected tool name in help message for vsg_rule_doc_gen.

* Issue#1225: Added path argument to vsg_rule_doc_gen.

* Issue#1225: Passed path argument to top-level function in vsg_rule_doc_gen.

* Issue#1225: Updated reserved_rules documentation.

* Issue#1225: Updated ieee_rules documentation.

* Issue#1225: Whitespace changes.

* Issue#1225: Simple test added for the main function in vsg_rule_doc_gen.

* Issue#1225: Whitespace changes to appease black formatter.
2024-09-08 19:51:31 -05:00
JHertz5 49a4924be3
Issue#1220: Documentation typo and link fixes. (#1221) 2024-09-08 19:41:38 -05:00
Jeremiah Leary 0dbc78a350
Issue#1198: Adding regex option to rule port_map_002. (#1199) 2024-07-19 07:00:50 -05:00
Jeremiah Leary 3e3f22d999 Fixing documentaton link. 2024-07-12 03:38:33 -05:00
Jeremiah Leary 631d39c246
Issue#1186: Additional whitespace rules added. (#1192)
* Issue#1186:  Additional whitespace rules added.

* Fixing style issues.
2024-07-12 03:19:06 -05:00