Commit Graph

697 Commits

Author SHA1 Message Date
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
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