* Issue#1451: Fixed array detection in multiline_alignment_between_tokens
* Move function toi_is_array from multiline_simple_structure to the
utils module and use this function in
multiline_alignment_between_tokens, because it correctly classifies
parenthesis of aggregates. The previous function there falsely
triggered array detection on parenthesis around logical operators.
* Rename "check_for_array" to "skip_array", because that is what the
variable is used to do.
* Extend tests for concurrent_003 with logical expressions that start
with a parenthesis.
* Issue#1451: Fixed parenthesis handling in multiline_alignment_between_tokens
Do not add parenthesis pairs to the list of occurring parenthesis if
they are on the same line.
* Issue#1446: Fixed comment indentation at end of scope
* config: Refactored glob_filenames
* config: Fixed error message construction in validate_file_exists
* config: Fixed process_file_list_key to use key parameter
* Issue#1425: Fixed missing globbing of "file_rules"
* Adding tests.
* Revert "Issue#1446: Fixed comment indentation at end of scope"
This reverts commit 7106e12fd05049924ea89447922b00de0c83c7fc.
---------
Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
* Issue#1250: Corrections to multiline_alignment for method _analyze_align_left_no_align_paren_yes.
* Issue#1250: Updated tests after corrections to multiline_alignment for method _analyze_align_left_no_align_paren_yes.
* Issue#1250: Updates after merge of issue-1290.
* Issue#1250: Updated "align_left no, align_paren no" alignment as well.
* Issue#1250: Updated tests for signal_400.
* Issue#1250: Updated tests for variable_400.
* Issue#1250: Formatting.
This rule checks for multiple (shared) variable names defined in a single (shared) variable declaration.
By default, this rule will only flag more than two (shared) variable declarations.
* Issue#1459: Added rule instantiation_036.
* Issue#1459: Added tests for rule instantiation_036.
* Issue#1459: Added docs for rule instantiation_036.
* Issue#1459: Test change to trigger CI run.
* Revert "Issue#1459: Test change to trigger CI run."
This reverts commit d983807ceadb9c6b942ea60f327dce28fc96b485.
* Issue#1459: Changed default behaviour to "add".
* Issue#1446: Fixed comment indentation at end of scope
* Refactored implementation:
1) Removed pragma updates
2) Added options to configure
a) Declarative part can be configured independent of statement part
3) Added documentation
4) Updated tests for all combinations of configurations
* Fixing configuration merge of indent options.
* Minor updates to error reporting.
* Updating failing tests.
---------
Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>
* Issue#1442: Ensuring ISO-8859 encoded files are written as ISO-8859 encoded files.
* Attempting to get builds to pass.
* Attempting to update build tool versions.
* Updating license to current standard.
* Disabling manifest to debug github action errors.
* Switching out pytest for unittest
* Adding __init__.py file so file_encodings test runs
* Attempting to skip failing tests.
* Attempting to skip tests during GITHub actions.
* Adding debug prints.
* Printing out environment variables to help with debug.
* Using HOME environment variable to test for GITHUB.
* Removing debug print statements.
* Enabling pytest.
* Replacing pytest with unittest.
Pytest is failing on some plugin and I do not know how to fix it.
* Issue#1383: Added case rules for file declarations.
* Issue#1383: Added tests for case rules for file declarations.
* Issue#1383: Added documentation for case rules for file declarations.
* Issue#1383: Added case rules for file type declarations.
* Issue#1383: Added tests for case rules for file type declarations.
* Issue#1383: Added documentation for case rules for file type declarations.
* Issue#1383: Corrected "file type declaration" to "file type definition".
* Issue#1389: Expanded on case rules to check that they don't affect case-generates.
* Issue#1389: Added new case generate rules.
* Issue#1389: Added tests for new case generate rules.
* Issue#1389: Added documentation for new case generate rules.
* Issue#1389: Corrected test file reference.
* Issue#1389: Corrected code snippet.
* Issue#1389: Corrected code snippet.
* Issue#1389: Connected code snippets
* Issue#1389: Corrected code snippet.
* Issue#1389: Corrected code snippet
* Issue#1389: Updated rules to use simpler base rules where possible.
* Issue#1389: Updated rules to use simpler base rules where possible.
* Issue#1389: Corrected mistake in case_004.
* tests: support admin check on Windows
The tests fail on Windows with the following
> ___________ ERROR collecting tests/source_file/test_source_file.py ____________
> tests\source_file\test_source_file.py:24: in <module>
> class testOSError(unittest.TestCase):
> tests\source_file\test_source_file.py:39: in testOSError
> @unittest.skipIf("SUDO_UID" in os.environ.keys() or os.geteuid() == 0, "We are root. Root always has permissions so test will fail.")
> E AttributeError: module 'os' has no attribute 'geteuid'
Catch the AttributeError and attempt to check for admin when on Windows
Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
* tests: support running 'vsg' binary on Windows
A large number of tests fail on Windows with the following error
> ________ test_severity_using_main.test_architecture_with_configuration ________
> [gw0] win32 -- Python 3.8.20 %PREFIX%\python.exe
>
> self = <tests.severity.test_main.test_severity_using_main testMethod=test_architecture_with_configuration>
>
> def test_architecture_with_configuration(self):
> try:
> > subprocess.check_output(["bin/vsg", "-f", self._sArchitectureFileName, "-c", sConfigFile])
>
> tests\severity\test_main.py:86:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ..\_test_env\lib\subprocess.py:415: in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
> ..\_test_env\lib\subprocess.py:493: in run
> with Popen(*popenargs, **kwargs) as process:
> ..\_test_env\lib\subprocess.py:858: in __init__
> self._execute_child(args, executable, preexec_fn, close_fds,
...
> E FileNotFoundError: [WinError 2] The system cannot find the file specified
> ..\_test_env\lib\subprocess.py:1327: FileNotFoundError
Tests that call "bin/vsg" are relying on the Unix shebang (e.g.
"#!/usr/bin/python") to launch `vsg` using the Python interpreter, But
this is not supported on Windows. Instead launch `vsg` with Python
directly.
Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
* tests: normalize line endings for Windows tests
Many of the tests that compare `vsg` stdout fail with a warning as
follows.
> First differing element 0:
> 'ERRO[19 chars]1.vhd(7)port_007 -- Change number of spaces after *in* to 4.\r'
> 'ERRO[19 chars]1.vhd(7)port_007 -- Change number of spaces after *in* to 4.'
The tests use `.split('\n')` to split stdout and stderr by the Linux
line terminator '\n'. But on Windows this causes test failures as the
line terminator is '\r\n'.
Instead use Python `.splitlines()`. which will split on both Linux and
Windows style line terminators. `.splitlines()` also removes empty
trailing lines, so we must modify the expected output accordingly.
Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
* Fixing test error by including encoding when reading vhdl files.
* Fixing second error due to glob function using incorrect divider.
* Fixed file compare not working in quality report test.
* Fixed output error message to be independent of platform.
* Skipping permission tests when running on windows.
* Skipping file permission test when running on Windows.
---------
Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Co-authored-by: Jeremiah Leary <jeremiah.c.leary@gmail.com>