Commit Graph

2305 Commits

Author SHA1 Message Date
Jeremiah Leary eb086accf8
Updates for issue #563 (#757)
Added rule procedure_call_400 to align multiline procedure calls.

  1)  Added tests
  2)  Added documentation
  3)  Added rule procedure_call_400
2022-04-30 08:09:08 -05:00
Jeremiah Leary 4d449e820c
Issue 761 (#765)
* Updates for issue #761

Fixing issue with rule block_007 not honoring nested blocks with respect to labels.

  1)  Updated tests to expose the issue
  2)  Updated extractor to honor nested constructs

* Refactoring to improve readability.

* Removing trailing whitespace.

* Removing unused variable.
2022-04-28 08:21:11 -05:00
Jeremiah Leary b6571775a2
Updates for issue #763 (#764)
Adding rule to remove blank lines in a port map aspect.

  1)  Added documentation
  2)  Added tests
  3)  Added rule port_map_200
2022-04-28 08:20:53 -05:00
Jeremiah Leary 63d06c4f36 Updates for issue #758
Minor fixes to documentation.

  1)  Updated Fixed code snippet for rule assert_005
  2)  Updated Fixed code snippet for rule loop_statement_201
  3)  Updated Fixed code snippet for rule report_statement_001
2022-04-25 20:38:20 -05:00
Jeremiah Leary 99dfc6a73b
Updates for issue #742: (#754)
* Updates for issue #742:

Adjusting indenting for comments near use_clauses and case generates.

  1)  Added rule case_generate_alternative_300
  2)  Changed indenting of comments after use_clauses

* Removing trailing whitespace.

* Updating comment indent logic to look forward.

  1)  Updated set_token_indent
  2)  Updated comment_010 tests
  3)  Updated block_comment tests

* Updating code tags logic to properly apply tags:

  1)  Off code tags applied to the comment token
  2)  On code tags applied after the comment token
  3)  Next line code tag no change

* Addressing Codacy issues.

* Refactoring to remove number of parameters passed to functions.

* Refactoring to improve readability.
2022-04-22 19:21:07 -05:00
Jeremiah Leary e94466afe2 Fixing formatting. 2022-04-22 08:26:24 -05:00
Jeremiah Leary 324eb525cb Adding notice about change in comments. 2022-04-22 08:24:57 -05:00
Jeremiah Leary b448eb9319 Updating rule library_500 to allow case exceptions. 2022-04-19 19:22:21 -05:00
Jeremiah Leary 267b17e72a
Updates for issue #730 (#741)
* Updates for issue #730

Adding rules to handle case for use_clause selected names.

  1)  Added new tokens to use_clause
  2)  selected names now parsed with new tokens
  3)  Added rules:
      a)  use_clause_500
      b)  use_clause_501
      c)  use_clause_502
      d)  use_clause_503
  4)  Added tests

Resolves #730

* Refactoring to reduce duplication.
Removing trailing whitespace.

* Changing exceptions to case_exceptions.

1)  case::name rules allow case_exceptions by default
2)  Updated instantiated_unit to split entity_name with a library name
3)  Rule instantiation_028 simplified
4)  Removed unused test file

* Refactoring to reduce complexity.

* Refactoring to improve readability.

* Fixed isue with procedure_506 crashing VSG due to missing variable.

* Fixing missing call to lowercase list.

* Adding the following rules:

  context_ref_500
  context_ref_501

Deprecated the following rules:

  context_ref_004

* Placing common code into a single file.

* Removing trailing whitespace.

* Refactoring to reduce the number of parameters.
2022-04-19 19:21:20 -05:00
Jeremiah Leary 940fa31e15
Updates for issue #679 (#753)
* Updates for issue #679

Fixing encoding issues when reading and writing files.

  1)  Added utf-8 encoding and decoding
  2)  Fixed issue with token map which was causing vsg to crash.

* Removing trailing whitespace.
2022-04-13 19:51:59 -05:00
Jeremiah Leary c4b05f8020 Preparing for release 3.10.0 2022-04-10 20:56:33 -05:00
Jeremiah Leary ab566beed2
Updates for issue #750 (#752)
* Updates for issue #750

Fixed code tags to allow for comments within the tag.

  1)  Updated tests
  2)  Updated documentation
  3)  Updated code tag logic to ignore anything after the : within the code tag

* Additional code tag updates
Added parsing of exponents.

* Minor formatting fixes.

* Refactored split_natural_numbers to improve readability.

* Refactoring code tag logic to improve readability.

* Minor formatting updates.

* Removing trailing whitespace.

* Refactoring to improve readability.

* Refactoring to reduce line length.

* Fixing indent.

* Adding rule exponent_500.
2022-04-10 20:10:49 -05:00
Jeremiah Leary a66b65632a
Updates for issue #746 (#748)
* Updates for issue #746

Moved library_600 to library_500.
Added exceptions for invalid configurations.

* Removing whitespace.
2022-04-10 20:09:20 -05:00
Jeremiah Leary 120b9f09c1
Resolving conflict between if rules and loop_statement rules regarding blank lines. (#749)
Adding overrides to if blank line rules to allow loop_statements to be one blank line away.
2022-03-31 15:11:26 -05:00
Jeremiah Leary cdbdf60da1 Preparing for release 3.9.0 2022-02-20 09:14:06 -06:00
Jeremiah Leary 7c2c21aab1
Updates for issue #727: (#739)
* Updates for issue #727:

Adding rule to check for consecutive blank lines.

  1)  Added rule whitespace_200
  2)  Added tests
  3)  Added documentation

* Removing trailing whitespace.

* Deprecating the following rules:

  * context_026
  * context_027

* Fixing index error issue.
2022-02-20 08:52:56 -06:00
Jeremiah Leary a0709483e0
Updates for issue #542: (#734)
* Updates for issue #542:

Rule comment_010 was firing after block_comment rules were ran:

  1)  Updated indent logic to take block comments into consideration
  2)  Added attributes to comment class to indicate if it is a block comment
  3)  Updated tests
  4)  Simplified extractor
  5)  Added method to token_map

* Refactoring functions to reduce duplication and complexity.

* Removing trailing whitespace.

* Removing excess blank lines.

* Refactoring to remove identical code.

* Refactoring to reduce complexity.

* Refactoring to reduction complexity.

* Refactoring to improve readability.

* Reverting to previous utils.py due to inadvertant commit.

* Refactoring block_comment_002 to reduce complexity and improve readability.

* Refactored block_comment_002 to reduce complexity.

* Refactoring block_comment_002 to reduce complexity.

* Refactoring block_comment_002 to improve readability.

* Refactoring to improve readability.

* Moving _analyze from block_comment_002 and block_comment_003 into base block_rule.

* Minor formatting updates.

* Updated base rule to ignore leading and trailing vsg code tags.

* Forcing tags of vsg_on to be applied on the next token.

* Refactoring methods to make them more readable.
2022-02-20 08:29:41 -06:00
Jeremiah Leary 52c52389ff
Updates for issue #676 (#735)
Deprecating rule entity_specification_502.

The entity_designator should be enforced by a consistent case rule.
2022-02-20 07:52:10 -06:00
Jeremiah Leary 0bdaf811d6
Updates to resolve #643 (#733)
* Updates for issue #643

Adding rule port_600.

* Adding rule port_601.

* Adding rule port_602.

* Refactoring to improve readability.

* Removing unused test file.

* Adding rule port_605.

* Fixing mis named function.

* Adding rule port_606.

* Adding rule port_607.

* Fixing misclassification of buffer mode type.

* Fixing misclassification of linkage port types.

* Adding rule port_603.

* Adding rules port_608 and port_609.

* Refactoring to reduce duplication.
2022-02-20 07:51:00 -06:00
Jeremiah Leary ad6164532b
Updates for issue #673 (#744)
Fixing rule if_005 to remove whitespace if there is not a parenthesis.

  1)  Updated tests
  2)  Updated rule
2022-02-20 07:49:15 -06:00
Jeremiah Leary a26a4d86e3
Updates for issue #689: (#737)
* Updates for issue #689:

Adding rule if_generate_statement_500.

Resolves #689

* Adding the following rules:

   if_generate_statement_501
   if_generate_statement_502
   if_generate_statement_503

* Adding the following rules:

  * generate_500
  * generate_501

* Adding the following rules:

  * for_generate_statement_500
  * for_generate_statement_501

* Adding the following rules:

  * case_generate_alternative_500
  * case_generate_statement_500
  * case_generate_statement_501
2022-02-20 07:47:14 -06:00
Jeremiah Leary 0d0cf6a311
Updates for issue #626 (#736)
* Updates for issue #626

Adding rule to enforce whitespace between others and =>.

  1)  Added rule element_association_100
  2)  Added documentation
  3)  Added classification of others and =>

* Adding rule element_association_101.

* Adding element_association rules to documentation.
2022-02-20 07:46:29 -06:00
Jeremiah Leary 0e32406605
Updates for issue #657: (#740)
* Updates for issue #657:

Adding rules for entity declarations:

  1)  Added rule entity_021

Resolves #657

* Adding rule entity_022.

* Adding rule entity_023.

* Adding rules:

  * entity_024
  * entity_025

* Adding rules:

  * entity_026
  * entity_027
  * entity_028

* Adding rule entity_029.

* Adding rule entity_300.

* Adding rule entity_500

* Adding rules:

  * entity_201
  * entity_202
  * entity_203

* Removing trailing whitespace.
2022-02-13 13:22:50 -06:00
Jeremiah Leary 9d010dc958 Preparing for release 3.8.0 2022-02-13 08:54:23 -06:00
Jeremiah Leary 9938053690
Updates for issue #702 (#738)
Adding rule logical_operator_500 to manage case of logical operators.

Resolves #702
2022-02-12 14:58:38 -06:00
bae-pabr 1b3853a0c4
fix typo in example ('disabled' -> 'disable') (#732)
* fix typo in example ('disabled' -> 'disable')

* fix typo in example ('disabled' -> 'disable')

also update doc string in the rule file (must match the restructured text documentation)
2022-02-10 08:17:09 -06:00
Jeremiah Leary a22b402e4c Merge branch 'master' of https://github.com/jeremiah-c-leary/vhdl-style-guide 2022-02-09 20:28:44 -06:00
Jeremiah Leary ca3a92017f Updating git to ignore all versions of version_info.* 2022-02-09 20:28:14 -06:00
Jeremiah Leary c2014549a7
Updates for issue #729 (#731)
* Updates for issue #729

Added rule ieee_500 to handle case of ieee keywords.

* Minor formatting updates.
Moved similar token classifications from name, subtype_indication and expression to utils.

* Fixing doc string.

* Deprecating rule signal_010.

* Deprecating rule signal_011.

* Deprecated rule constant_011.

* Deprecating rule variable_010.

* Removing trailing whitespace.

* Moving method to utils.

* Refactored method into function and placed it in utils.

* Refactoring to remove duplication.

* Fixing indenting.
2022-02-09 20:16:02 -06:00
Jeremiah Leary 4274d7f47b Merge branch 'master' of https://github.com/jeremiah-c-leary/vhdl-style-guide 2022-02-09 08:33:33 -06:00
Jeremiah Leary 2f152e1f1c Fixing error message output. 2022-02-09 08:33:22 -06:00
Jeremiah Leary 41351345ab
Issue 722 (#726)
* Updates for issue #722

Adding rule case_201.

* Adding rule case_202.

* Deprecating rule case_008.

* Removed rule case_202.
2022-02-09 06:37:15 -06:00
Jeremiah Leary 1d75e56534
Updates for issue #678 (#728)
Adding rule constant_100 to add a space after the assignment operator.

This addresses an issues where constant arrays were not being alignmed correctly.
2022-02-07 06:04:17 -06:00
Jeremiah Leary 32468905b8 Updates for issue #704:
Fixing broken links in documentation.
2022-02-05 16:51:00 -06:00
Jeremiah Leary f663ccfec8 Fixing linking for library rules. 2022-02-05 16:50:43 -06:00
Jeremiah Leary ad87ea65ee Changing links to configuration documentation into ReST substitations.
Re-ordered configuration documentation entries so they are alphabetical.
2022-02-05 15:13:48 -06:00
Jeremiah Leary a820c8a30f Updates for issue #704 and #720:
Fixing broken links from rules back to configuration documentation.
2022-02-05 10:04:55 -06:00
Jeremiah Leary 7cb13d88e3 Preparing for release 3.7.0 2022-02-05 06:36:59 -06:00
Jeremiah Leary b562817216
Updates for Issue 682 (#716)
* Updates for issues #655 and #707:

VSG would lockup if an error was encountered during classification.

  1)  Exception added to print_error_message to report classification errors.
  2)  Exception is caught in apply_rules.py and handled so it does not lock up the multiprocessing pool.

* Updates for issue #682

Trailing whitespace after phase 1 were being introduced by some rules.

  1)  Added function to remove trailing whitespace after phase 1
  2)  Added test

* Fixing case on variable name.

* Removing unused import.
2022-02-05 06:31:12 -06:00
Jeremiah Leary eed0069050
Updates for issue #680 (#714)
* Updates for issue #680

Alignment of sequential assignments would take two passes to complete.

  1)  Isolated issue to process_004 being ran before process_400
  2)  Updated test
  3)  Set sequential_004 to run after process_400

* Fixed issue where process_029 was running after if_002 and removing the parenthesis.

  1)  Moved if_002 to subphase 2.
2022-02-05 06:26:23 -06:00
Jeremiah Leary 3dd48d9464
Updates for issue #624 (#708)
* Updates for issue #624

Adding documentation for new loop rules.

* Updating another alternative output for json export.

* Temporarily reducing documentation for loop statements.

* Updating test to use correct json file for comparison.

* Adding rule loop_statement_500.

* Adding rule loop_statement_501.

* Adding rule loop_statement_502.

* Added rule loop_statement_301.

* Adding rule loop_statement_100.

* Adding rule loop_statement_101.

* Adding rule loop_statement_102.

* Refactoring base rule single_space_before_token.

* Refactoring to improve readability.
Minor formatting updates.

* Minor formatting fixes.

* Refactoring base rule single_space_after_token to improve readability.

* Refactoring to improve readability.

* Adding rule loop_statement_001.

* Added rule loop_statement_002.

* Adding rule loop_statement_003.

* Adding rule loop_statement_004
Adding rule loop_statement_201

* Adding rule loop_statement_202.

* Adding rule loop_statement_203.
Fixing documentation for rule loop_statement_201.

* Minor formatting changes.

* Moved rule for_loop_002 to loop_statement_302.
Minor grammar updates in documentation.

* Moving rule for_loop_003 to loop_statement_503.

* Clarifying documentation on rule loop_statement_503.

* Moved rule for_loop_005 to loop_statement_104:

* Refactoring to improve readability.

* Adding rule loop_statment_504.

* Adding rule loop_statement_005.

* Adding rule loop_statement_007.

* Adding rule loop_statement_006.

* Refactoring to improve readability.

* Deprecated rule while_loop_002 as it was a duplicate of rule loop_statement_302.

* Fixing solution text.

* Adding rule iteration_scheme_500.

* Adding rule iteration_scheme_501.

* Adding rule iteration_scheme_100.

* Adding rule iteration_scheme_101.

* Moved rule while_loop_001 to rule iteration_scheme_300.

* Moving rule for_loop_001 to iteration_scheme_301.

* Adding rule loop_statement_200.

* Adjusting number of tokens grabbed to fix error.
2022-02-05 06:15:47 -06:00
Jeremiah Leary 7667151e1b Updating announcement. 2022-02-05 05:56:23 -06:00
Jeremiah Leary 3e5648c5b4
Rule port_007 updated to check spaces before and after. (#712)
* Rule port_007 updated to check spaces before and after.

* Refactoring base rule spaces_before_and_after_tokens_when_bounded_by_tokens.

* Attempting to get test to pass.

* Fixing minor issues.

* Refactoring to improve readability.

* Refactoring to improve readability.

* Updates for code coverage:

  1)  Improved testing
  2)  Removed unused test input

* Updating rule port_008 to cover spaces before and after out keyword.

* Converting rule port_009 to check for spaces before and ader inout keyword.

* Adding updated documentation for rule port_009.

* Deprecating rule port_005.
2022-02-04 18:32:41 -06:00
Jeremiah Leary 68c8ff7241
Implementing issue #709 (#713)
* Changing rule port_map_004 to allow for moving the closing parenthesis to the same line as the last part assignment.

* Skipping JSON test as a fix was already performed on another branch.

* Removed trailing spaces.

* Converted generic_map_004 to use move_token base rule.

* Adding rule instantation_035.

* Refactoring to improve readability.

* Updating documentation.

* Updated rule generic_010 to allow for parenthesis to be on same line or next line.
Added rule generic_021 to enforce semicolon next to closing parenthesis.

* Refactoring to improve readability.

* Updating rule port_014 to allow for moving the closing parenthesis to the previous line.
Adding rule port_027 to force semicolon to be next to closing parenthesis.
2022-02-04 18:25:10 -06:00
Jeremiah Leary 388d21873c
Updates for issue #661: (#718)
* Updates for issue #661:

Adding rule alias_declaration_500.

* Adding rule alias_declaration_501.

* Adding rule alias_declaration_502.

* Adding rule alias_declaration_001.

* Adding test for alias_declaration documentation.

* Adding rule alias_declaration_100.

* Adding rule alias_declaration_101.

* Adding rule alias_declaration_102.

* Updating rules architecture_029 and block_400 to align alias designators.

* Updating rule package_019 to align alias designators.

* Updating rule package_body_400 to align alias designators.

* Updating rule process_031 to align alias designators.

* Updating rule function_015 to align alias designators.

* Updating rule procedure_010 to align alias designators.

* Update rule architecture_026 to align alias declaration is keyword or colon.

* Updating the following rules to align alias elements:

    block_401
    function_012
    package_400
    procedure_401
    process_033

Adding the following rule to align alias elements:

    package_body_401

* Minor formatting updates.

* Adding rule alias_declaration_300.

* Adding rule alias_declaration_600.

* Adding rule alias_declaration_601.

* Adding rule alias_declaration_503.

* Updating rule generate_400 to align alias designators.

* Updated rule generate_401 to align alias declaration colon and is keyword.

* Updated rule generate_402 to align alias designators.

* Updated rule generate_403 to align alias declaration colon and is keyword.

* Updated rule generate_404 to align alias designators.

* Updated rule generate_405 to align alias colon and is keyword.

* Fixing documentation on rule alias_declaration_101.
2022-02-04 18:16:08 -06:00
Jeremiah Leary 5d12349283
Updates for issue #719 (#725)
The solution for rule comment_100 was misleading.
2022-02-04 18:06:44 -06:00
Jeremiah Leary 29eb908bbc
Updates for issues #655 and #707: (#715)
* Removing unused import.

* Skipping test that randomly fails.
2022-02-04 10:50:28 -06:00
Jeremiah Leary 41b0a3704f
Updates for Issue 705 (#717)
* Updates for issues #655 and #707:

VSG would lockup if an error was encountered during classification.

  1)  Exception added to print_error_message to report classification errors.
  2)  Exception is caught in apply_rules.py and handled so it does not lock up the multiprocessing pool.

* Updates for issue #705:

Changing rule constant_014 to include align_left and align_parent options.

* Refactoring to reduce duplication.

* Changing options for constant_012 from boolean to strings to align with similar rules.
2022-02-03 18:55:58 -06:00
Jeremiah Leary 93aefdf257
Updates for issue #721 (#724)
Header width calculations were not taking the allow_indenting being false into account.
This resulted in invalid header generation based on the level of indenting.

  1)  Updated tests
  2)  Updated leading whitespace calculation
2022-02-03 18:48:26 -06:00
Jeremiah Leary 9b6983341e Skipping test that fails randomly. 2022-02-01 07:55:45 -06:00