Commit Graph

8 Commits

Author SHA1 Message Date
Alon Bar-Lev c22a86025f style: apply black
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2024-03-24 21:16:35 +02:00
Alon Bar-Lev 5b4bae04aa style: apply isort
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2024-03-24 21:16:35 +02:00
Alon Bar-Lev b8c49b5946 style: python encoding
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2024-03-24 21:16:35 +02:00
Alon Bar-Lev 6aca7f56d5 style: remove trailing spaces
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2024-03-24 21:16:35 +02: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
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
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 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