Commit Graph

686 Commits

Author SHA1 Message Date
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
JHertz5 e6f25f5332
Issue#981 Corrected None to "" in block comment example configurations. (#986)
* Issue#981 Corrected None to "" in block comment example configurations.

* Issue#981 Updated empty string's double quotes to single quotes for consistency.

---------

Co-authored-by: JHertz5 <jukka.herzog@live.co.uk>
2023-08-06 12:20:21 -05:00
JHertz5 a24651383e
Issue#970: Correcting title on Whitespace Rule Group page. (#972)
Co-authored-by: JHertz5 <jukka.herzog@live.co.uk>
2023-08-06 11:50:27 -05:00
JHertz5 21978ad81f
Issue#973: Correcting typo in code example on Configuring Rule Groups page. (#974)
Co-authored-by: JHertz5 <jukka.herzog@live.co.uk>
2023-08-06 11:13:19 -05:00
JHertz5 dce9d58639
Issue#979 Corrected links in pages within rule_groups directory. (#980)
Co-authored-by: JHertz5 <jukka.herzog@live.co.uk>
2023-08-06 07:20:46 -05:00
Jeremiah Leary 6a6390715c Issue#977: Fixing broken link in disabled rules documentation. 2023-08-06 06:50:20 -05:00
Jeremiah Leary 6ac68da4e9 Issue#977: Fixing broken link in configuration disabled rules documentation. 2023-08-06 06:44:53 -05:00
Jeremiah Leary ba1fe3d3a6
Issue#910: Implemented fix logic for rule constant_007. (#957) 2023-05-14 04:52:32 -05:00
Jeremiah Leary bab5fbd1f4
Issue#929: Fixing issue with moving label and the postponed keyword. (#933)
* Issue#929:  Fixing issue with moving label and the postponed keyword.

* Refactoring per code climate.

* Removing unused parameter.

* Adding rule process_039 to enforce postponed on same line as process.
2023-04-20 06:46:52 -05:00
Jeremiah Leary 1f15511992
Issue#918: Adding rules for function and procedure optional keywords. (#939)
* Issue#918:  Adding rules for function and procedure optional keywords.

* Combining left and right base rules.

* Refactoring to improve readability.

* Fixing issue with keyword not being inserted.
2023-04-19 07:01:22 -05:00
Jeremiah Leary 05b7693fc3
Issue#907: Removing rule procedure_412 (#941) 2023-04-13 07:46:27 -05:00
Jeremiah Leary fb3160cb37
Issue#927: Adding checks for keywords in comments. (#934)
* Issue#927:  Adding checks for keywords in comments.

* Fixing spacing issue.
2023-04-11 10:48:39 -05:00
Jeremiah Leary 2f12bbd4dc
Issue #837 (#903): Adding listing of rules in rule groups. 2022-12-21 11:51:29 -06:00
Jeremiah Leary 7fc6404f49
#827 (#838): Updating comment_100 to be configurable.
* Updates for issue #827

Changing behavior of comment_100:

  1)  block comments are ignored
  2)  Exceptions added to ignore rule

* Fixing style issue.

* Adding rule comment_101 to enforce whitespace after a comment pattern.

* Merging comment_101 into comment_100.

* Allowing patterns to be configurable.

* Updating documentation to current standards.

* Updating note.

* Moving Note into description for each option.

* Fixing grammar.
2022-12-13 18:20:22 -06:00
Jeremiah Leary 6a4f748a87
Issue 850 (#861)
* Updates for issue #850

Adding rules to indent with keyword

  1)  Added documentation
  2)  Added tests
  3)  Added rules:
        concurrent_selected_signal_assignment_300
        selected_force_assignment_300
        selected_variable_assignment_300
        selected_waveform_assignment_300

* Adding the following rules:

  concurrent_selected_signal_assignment_500
  selected_force_assignment_500
  selected_variable_assignment_500
  selected_waveform_assignment_500

* Adding rules:

  concurrent_selected_signal_assignment_501
  selected_force_assignment
  selected_variable_assignment
  selected_waveform_assignment

* Adding rule:

  selected_force_assignment_502

* Fixing documentation.

* Adding rule selected_expressions_500

* Adding rule selected_waveforms_500.

* Adding rules:

  concurrent_selected_signal_assignment_100
  selected_force_assignment_100
  selected_variable_assignment_100
  selected_waveform_assignment_100

* Adding rules:

  concurrent_selected_signal_assignment_101
  selected_force_assignment_101
  selected_variable_assignment_101
  selected_waveform_assignment_101

* Adding rules:

  concurrent_selected_signal_assignment_102
  select_force_assignment_102
  select_variable_assignment_102
  select_waveform_assignment_102

* Adding rules:

  concurrent_selected_signal_assignment_103
  selected_force_assignment_103
  selected_varaible_assignment_103
  selected_waveform_assignment_103

* Adding rules:

  concurrent_selected_signal_assignment_104
  selected_force_assignment_104
  selected_variable_assignment_104
  selected_waveform_assignment_104

* Added rule selected_force_assignment_105.

* Adding rules:

  selected_expressions_100
  selected_waveforms_100

* Adding rules:

  selected_expressions_101
  selected_waveforms_101

* Adding structure base rule.

Adding rule selected_assignment_001

* Refactoring analysis functions to improve readability.

* Adding more options to rule selected_assignment_001.

* Adding documentation for selected_assignment rules.

* Adding rule selected_assignment_100.

* Adding rule selected_assignment_101.

* Adding rule selected_assignment_102.

* Adding rule selected_assignment_103.

* Adding rule selected_assignment_104.

* Adding rule selected_assignment_105.

* Adding rule selected_assignment_106.

* Adding rule selected_assignment_107.

* Removing unused file.

* Adding rule selected_assignment_500.

* Adding rule selected_assignment_501.

* Adding rule selected_assignment_502.

* Adding rule selected_assignment_503.

* Adding rule selected_assignment_300.

* Removing rules which were merged into selected_assignments.

  * concurrent_selected_signal_assignment
  * selected_force_assignment
  * selected_variable_assignment
  * selected_waveforms

* Updating indenting on selected with and semicolon keywords.

* Deprecating rule with_001.

* Adding rule selected_assignment_400.

Minor update to multiline_alignment_between_tokens base rule to support selected_assignment_400.

* Fixing yaml configuration.

* Fixing tags.

* Fixing last yaml example.

* Removing rule selected_assignment_001

* Removing unused directories.

* Fixing documentation links.

* Saving previous rule_001 to a temporary file.

* Adding rule selected_assignment_001

* Adding rule selected_assignment_002.

* Adding rule selected_assignment_003

* Adding rule selected_assignment_004.

* Removing subphase from rules.

* Adding rule selected_assingment_005.

* Adding rule selected_assignment_006.

* Fixing issue in base rule where processing order was not being preserved.

* Adding rule selected_assignment_007.

* Adding rule selected_assignment_008.

* Updated base rule to accept token pairs.

* Updating rule to use token pairs.

* Adding rule selected_assignment_009.

* Adding rule selected_assignment_010.

* Adding rule selected_assignment_011.

* Adding rule selected_assignment_012.

* Minor update to rule documentatin.
2022-12-13 18:06:54 -06:00
Jeremiah Leary d3b8e703e8
Issue 864 (#895)
* Issue #864, #887 : Adding rule declarative_part_400 to align := in signal, variable and constant declarations.

* Ensuring alignment rules are performed in order.

* Updating minor issues flagged by codeclimate.

* Changing blank_line_ends_group to True.
2022-12-13 18:05:24 -06:00
Jeremiah Leary 931b44fabd
#898 (#899): Updating installation instructions when using pip. 2022-12-09 12:08:33 -06:00
Jeremiah Leary 4ecbbec6de
#886 (#889) : Adding rule procedure_call_101
* Issue #886 : Adding rule procedure_call_101

* Removing duplicate base rule.
2022-11-29 07:10:45 -06:00
Jeremiah Leary fe6c2cc160 Merge branch 'master' of https://github.com/jeremiah-c-leary/vhdl-style-guide 2022-11-14 19:06:16 -06:00
Jeremiah Leary 7a11838514
#859 (#862): Updating "Fix" output on rule block_400. 2022-11-14 18:40:31 -06:00
Jeremiah Leary 10e73f297c Adding theory of operation section. 2022-11-13 15:35:02 -06:00
Jeremiah Leary 6b01c4c6d1
#871 (#872): Updating documentation links.
* Issue #830:  Updating documentation links.

* Adding length rule link validation.

* Removing blank line at end of file.

* Fixing typo

* Updating links.

* Added test to check for underscores in links.

* Updating whitespace configuration links.

* Updating blank line links.

* Updating structure links.

* Updating naming rule links.

* Adding alignment configuration links.
2022-11-13 12:02:54 -06:00
JHertz5 0cf42a6ff6
#869 (#870): Corrected broken URL for rule if_030 in Configuring Blank Lines page.
Corrected broken URL for rule if_030 in Configuring Blank Lines page.

Co-authored-by: Jukka Hertzog <jukka.herzog@live.co.uk>
2022-11-13 07:30:50 -06:00
JHertz5 fbf52bae30
#867 (#868): Correction in concurrent procedure call configuration documentation.
Correction in concurrent procedure call configuration documentation.

Co-authored-by: Jukka Hertzog <jukka.herzog@live.co.uk>
2022-11-12 13:00:50 -06:00
Jeremiah Leary afab411088 Commenting out old release method. 2022-11-07 06:11:07 -06:00
Jeremiah Leary dc57b0fd62
Updates for issue #851 (#860)
Adding tests to validate links to configuration documenation.
2022-11-04 14:02:58 -05:00
Jeremiah Leary 6aea9e7e2c Adding structure::optional tag to rule architecture_010. 2022-10-21 19:09:11 -05:00
Jeremiah Leary cb98aebdcb
Updates for issue #846 (#848)
* Updates for issue #846

Rules whitespace_012 and whitespace_200 were duplicates.

   1) Moved whitespace_012 to whitespace_200.
   2) Deprecated whitespace_012

* Adding missing documentation.
2022-10-21 06:41:17 -05:00
Jeremiah Leary f594818e21 Removing invalid link in whitespace_002 rule documentation. 2022-10-20 18:46:58 -05:00
Jeremiah Leary d66da9a6a8
Issue 549a (#839)
* Updates for issue #549

Refactoring concurrent_011 into base rule multiline_simple_structure.

* Refactoring concurrent_009 into base rule multiline_conditional_alignment.

* Fixing name and identifier.

* Refactoring rule constant_012 into base rule multiline_array_alignment.

* Adding rule variable_assignment_007.

* Adding rule variable_assignment_008

  1)  Refactored multiline_structure to be configurable
  2)  Added documentation
  3)  Added tests

* Adding rule variable_assignment_400.

* Adding rule variable_assignment_400.

* Updating Documentation

  1)  Adding files which were not being built
  2)  Fixed links

* Adding rule concurrent_012.

* Adding rule concurrent_401

* Adding rule sequential_008.

* Adding rule sequential_009.

* Adding rule sequential_401

* Adding rule sequential_402

* Fixing documentation

* Fixing table rendering.

* Changing multiline_alignment_between_tokens to not work on arrays.

* Updating rule concurrent_011 to not operate on arrays.

* Fixing documentation issues:

  1)  Renamed several rules to improve readability
  2)  Fixed warnings from sphynx
  3)  Fixing links

* Adding links to rules.

* Updating docstring with correct links to configuration documentation.

* Updating formatting to match current standards.

* Updating formatting to current standard.

* Changing depricated to deprecated.

* Removing unused documentation.

* Updating table to current standards.

* Updating to latest standard.

* Updating to current formatting standards.

* Updating multiline indent rule:

  1)  Updated documentation
  2)  Added align left no align paren on tests
  3)  Updated the following options:
      a)  align_left_yes_align_paren_yes
  4)  Updated docstrings to have correct links.

* Adding example for align_left_no_align_paren_yes.

* Updating documentation per comments.

* Updating documentation per comments.

* Removing option move_last_comment from multiline_structure base rule.
2022-10-20 18:24:42 -05:00
Jeremiah Leary 4cd006748b
Updates for issue #843 (#844)
Adding case rule for enumerates types in type definitions.

  1)  Added documentation
  2)  Added test case
  3)  Added rule type_500
2022-10-18 17:02:12 -05:00
Jeremiah Leary 01dcf62648
Updates for issue #842 (#845)
Adding prefix/suffix rules for loop labels:

  1)  Added documentation
  2)  Added test cases
  3)  Added rules
      a)  loop_statement_600
      b)  loop_statement_601
2022-10-18 17:01:15 -05:00
Jeremiah Leary cc1242ee3b Minor updates to documentation. 2022-10-12 07:51:48 -05:00
Jeremiah Leary 79baa53d76
Updates for issue #832 (#835)
* Updates for issue #832

Added parameter to allow generate statement keywords to end groups.

  1)  Added tests
  2)  Added generate_statements_ends_group option to base rule configuring_keyword_alignment_rules
  3)  Updated documentation

* Defaulting generate_statement_ends_group option to false.

* Making generate_statement_ends_group enabled by default.
2022-10-10 06:35:50 -05:00
Jeremiah Leary 9f65068692
Updates for issue #559: (#798)
* Updates for issue #559:

Adding documentation for configuring indent rules.

* Adding documentation:

  1)  Updated whitespace_002
  2)  Added whitespace_014
  3)  Added configuring tabs vs spaces

* Adding example documentation.
Fixing table.

* Updated documentation:

  1)  Removed whitespace_014
  2)  Updated whitespace_002 to only work on middle tabs
  3)  Removed configuring_tabs_vs_spaces document
  4)  Removed tabs as an option for indenting

* Updating token indent rules.

* Adding smart_tabs test for rule assert_statement_001

* Updating rule assert_400 to allow smart tabs.

* Refactoring assert_400 to improve readability.

* Refactoring to reduce complexity.

* Updates for rule case_011 and assert_400:

  1) Replaced align_consecutive_lines_after_line_starting_with_token_and_stopping_with_token with assert_400
  2) Updated rule assert_400 to inherit align rule
  3) Changed rule case_011 to use align rule

* Removing rule case_021.

The function of the rule is now covered by comment_010.

* Deprecating rule case_generate_alternative_300.

* Refactoring analyze to _analyze.

* Splitting configuration of rule assert_400 into its own page.

* Updating multiline_alignment_between_tokens to handle smart tabs.

* Deprecating rules if_032 and if_033.  They are covered by comment_010.

* Updated report_statement_400 to use align_consecutive_lines_after_line_starting_with_token_and_stopping_with_token.

* Updating rule process_028 to handle smart-tabs

 1) Updated tests
 2) Updated base rule align_left_token_with_right_token_if_right_token_starts_a_line

* Updating rule library_009 to handle smart-tabs

  1)  Updated tests
  2)  Updated base rule align_consecutive_lines_starting_with_a_comment_above_line_starting_with_token

* Minor formatting updates.

* Adding methods to support multiline alignment base class.

* Refactored rule constant_012 to split indent and alignment whitespace.

* Adding smart-tab support to rule constant_012.

* Removing old classify code.

* Removing debug print statement.

* Updating documentation for assert and report_statement rules.

* Updating rule concurrent_009 to support smart-tabs.

  1)  Added tests
  2)  Updated rule to support smart-tabs

* Updating documentation to match current implementation.

* Taking a different approach for multiline_alignment_between_tokens.

  1)  Reverted smart_tabs changes
  2)  Updated base rule to method employed on concurrent_009
  3)  Commented out smart_tab tests

* Updated missing meta data to Toi in rule constant_014

Fixed error in align_left_no_align_paren_no analyzer.

* Adding smart-tab support to base rule multiline_alignment_between_tokens.

* Updating alignment rules to support smart tabs.

  1)  Updated base rules
      a) vsg/rules/align_tokens_in_region_between_tokens.py
      b) vsg/rules/align_tokens_in_region_between_tokens_skipping_lines_starting_with_tokens.py
      c) vsg/rules/align_tokens_in_region_between_tokens_unless_between_tokens.py
  2)  Updated rule concurrent_008
  3)  Added tests

* Fixing issue with rule port_map_009 misfiring if the following token sequence occured:  comma, whitespace, carraige return.

* Updating solution for indent rules to give required tabs and spaces.
Fixing several bugs in indent implementation:
  1)  checking for smart-tabs instead of smart_tabs

* Updates for Codacy issues.

* Additional Codacy updates.

* Fixing style issues identified by CodeClimate.

* Additional style fixes identified by CodeClimate.

* Refactoring alignment rules:

  1)  Created utils file specifically for alignment rules
  2)  Refactored rules to move identical code into utils file

* Moving update_column_width into alignment_utils file.

* Moving functions into alignment_utils:
  1)  get_first_line_info
  2)  starts_with_paren

* Using functions in alignment_utils.

* Collapsing branches to improve readability.

* Refactoring to improve readability.
2022-10-07 08:01:03 -05:00
Jeremiah Leary 3296fee4cc
Issue 536 (#793)
* Updates for issue #536:

Adding classification of aggregate open and close parenthesis.

* Adding rules to address aligning => operator in record assignments.

  1)  Added rules:
      * concurrent_400
      * sequential_400
  2)  Added tests
  3)  Added documentation

* Minor formatting updates.

* Adding import of aggregate to fix runtime error.
2022-09-25 13:11:21 -05:00
Jeremiah Leary 607e2b9fc3
Updates for issue #825 (#826)
Adding rules for conditional_waveforms and conditional_expressions.

  1)  Added documentation
  2)  Added tests
  3)  Added rules
2022-09-25 12:44:25 -05:00
Jeremiah Leary 9f2c4f580f Adding release process documentation. 2022-09-22 20:38:19 -05:00
Jeremiah Leary 4da9b34583
Updates for issue #813 (#814)
* Updates for issue #813

Adding ability to classify configurations:

  1) Added additional tokens
  2) Added classifiers
  3) Updated test

* Adding unspecified token in between end for and semicolon.
This token is not in the LRM spec, but apparently some compilers allow it.

* Refactoring to improve readability.
2022-08-13 08:14:30 -05:00
Jeremiah Leary 625ae4a93b
Updates for issue #596 (#787)
* Updates for issue #596

Adding feature to output quality report.

  1)  Added tests
  2)  Added quality_report command line argument
  3)  Output quality report

* Removing extra blank line.

* Removing unused import

* Adding documentation for integration with CI servers.

* Refocusing CI documentation to the output which is generated.

* Improving documentation:

  1)  Made JUnit example smaller
  2)  Minor grammar updates

* Adding link from table to heading.

* Adding link from table to content in page.
2022-08-01 21:04:35 -05:00