Commit Graph

1081 Commits

Author SHA1 Message Date
Will Kamp 9e701cfd45 Update remove comment function. Now handles quoted double hyphens. Strips trailing whitespace. 2020-01-08 17:50:28 +13:00
Will Kamp 41c3b72dc6 Use setdefault function to initialise dictionaries. 2020-01-08 17:47:51 +13:00
Will Kamp 36b1ba9065 Update comment detection regex. 2020-01-08 17:47:01 +13:00
Will Kamp 3fc726654e Various changes so that hyphens inside double quotes are not treated as a comment marker. 2020-01-08 17:46:21 +13:00
Will Kamp 822eae8f5f Fix for stripping comments that understands that double quoted stings with hyphens in it doesn't count. 2020-01-08 10:09:17 +13:00
Will Kamp be00b2f20d Fix for rule whitespace_011, it was confused by hyphens quoted strings (don't cares).
'-' is a std_logic don't care.
"-" is a std_logic_vector don't care.
"-1-0H-X" is a std_logic_vector with don't cares.
2020-01-08 10:09:17 +13:00
Will Kamp 7475368837 Fix rule comment_004 to use the comment location in oLine, such that it picks up the fix for comment detection. 2020-01-08 10:09:17 +13:00
Will Kamp cf4265cfe4 Fix inline comment detection so that it ignores double hyphens in double quoted strings.
for example, "--" : a two bit std_logic_vector literal of don't cares.
2020-01-08 10:09:17 +13:00
Will Kamp dbcebf026b Fix type keyword regex that miss-matches on record fields that start with "type".
type t_ip_header is record
    -- ...
    type_of_service : std_logic_vector(7 downto 0);
    -- ...
end record;
2020-01-08 10:09:17 +13:00
Jeremiah C Leary 9271a2ad4f Revert "Updates for issue #312:"
This reverts commit e3f6263df7.
2020-01-06 20:49:20 -06:00
Jeremiah C Leary 38dc4aea99 Revert "Updates for issue #312:"
This reverts commit bb8145b772.
2020-01-06 20:49:20 -06:00
Jeremiah C Leary ccfa1b6adb Revert "Updates for issue #312:"
This reverts commit f73a3e02a2.
2020-01-06 20:49:19 -06:00
Jeremiah C Leary 6cf2fdd5ce Revert "Updates for issue #312:"
This reverts commit d19b85b5a5.
2020-01-06 20:49:18 -06:00
Jeremiah C Leary 2f5eecf78a Revert "Updates for issue #312:"
This reverts commit 9fef3739d9.
2020-01-06 20:49:17 -06:00
Jeremiah C Leary 55143b4bc1 Revert "Updates for issue #312:"
This reverts commit 0109c0f609.
2020-01-06 20:49:16 -06:00
Jeremiah C Leary 7d9c492142 Revert "Updates for issue #312:"
This reverts commit d4ca0159ea.
2020-01-06 20:49:15 -06:00
Jeremiah C Leary a2e36c606b Revert "Updates for issue #312:"
This reverts commit 8e8b1799e4.
2020-01-06 20:49:12 -06:00
Jeremiah C Leary e49e226245 Revert "Updates for issue #312:"
This reverts commit 770630bbd9.
2020-01-06 20:47:05 -06:00
Jeremiah C Leary 282bb59691 Revert "Updates for issue #312:"
This reverts commit d80214f011.
2020-01-06 07:24:34 -06:00
Jeremiah C Leary 97b9e72f79 Merge branch 'master' of https://github.com/jeremiah-c-leary/vhdl-style-guide 2020-01-04 16:18:06 -06:00
Jeremiah C Leary d80214f011 Updates for issue #312:
Added separators attribute to line.

  1)  Updated tests to check both tokens and seperators lists
2020-01-04 16:16:03 -06:00
Jeremiah Leary 050e26eb97
Merge pull request #317 from m-kru/master
Make entity and component rule 012 inherit from case_rule.
2020-01-04 09:05:27 -06:00
Michał Kruszewski c9e5dffefe Make entity and component rule 012 inherit from case_rule. 2020-01-04 10:34:51 +01:00
Jeremiah C Leary 770630bbd9 Updates for issue #312:
Added another multisymbol test.
2020-01-02 18:58:19 -06:00
Jeremiah C Leary 8e8b1799e4 Updates for issue #312:
Added semicolon to single character symbols.
Added test with multiple symbols.
2020-01-02 18:49:46 -06:00
Jeremiah C Leary d4ca0159ea Updates for issue #312:
Added all operators and assignment symbols.
2020-01-02 18:43:38 -06:00
Jeremiah C Leary 0109c0f609 Updates for issue #312:
Refactored single character symbol parsing.
Added + to tokens.
2020-01-02 18:02:15 -06:00
Jeremiah C Leary 9fef3739d9 Updates for issue #312:
Added tokens for single and double quotes.
2020-01-02 17:21:56 -06:00
Jeremiah C Leary d19b85b5a5 Updates for issue #312:
Added open and close parenthesis tokens.
2020-01-02 17:11:48 -06:00
Jeremiah C Leary f73a3e02a2 Updates for issue #312:
Tokenizer now handles commas.
2020-01-02 15:35:46 -06:00
Jeremiah C Leary bb8145b772 Updates for issue #312:
Fixed issue if comment was at the beginning of the line.
2020-01-02 15:24:16 -06:00
Jeremiah C Leary e3f6263df7 Updates for issue #312:
Adding code to support tokenizing the line:

  1)  Added token attribute to the line object
  2)  Added token.py file
  3)  Adding tests

Currently the tokenizer handles consecutive spaces, comments and characters.

NOTE:  Future commits will handle VHDL symbols.
2020-01-02 15:17:17 -06:00
Jeremiah C Leary 865af46e75 Preparing for release 1.2.0 2020-01-02 14:30:03 -06:00
Jeremiah C Leary 0baf666392 Final updates to fix Codacy issues. 2020-01-02 14:02:20 -06:00
Jeremiah C Leary 86c708a986 Minor formatting updates for Codacy issues. 2020-01-02 11:58:48 -06:00
Jeremiah C Leary b70f6aa77b Minor formatting updates for Codacy issues. 2020-01-02 11:40:27 -06:00
Jeremiah C Leary e7a91cef71 Fixing formatting issues flagged by Codacy. 2020-01-02 11:23:09 -06:00
Jeremiah C Leary d669828923 Adding prospector configuration file to disable some formatting rules when running Codacy. 2020-01-02 11:09:15 -06:00
Jeremiah C Leary 43bc10b808 Updating tests for rules range_001 and range_002 to improve code coverage:
1)  Added tests to validate _get_solution was returing the correct message.
2020-01-02 10:32:48 -06:00
Jeremiah C Leary 7fffe18da3 Updating tests for rule length_001 to improve code coverage:
1)  Added tests to verify _get_solution method returned the correct message.
2020-01-02 10:29:07 -06:00
Jeremiah C Leary 5e824dd37a Updates to improve code coverage of rule entity_012:
1)  Updated tests to cover the _get_solution method.
  2)  Added docstring for entity classifier.
2020-01-02 10:19:52 -06:00
Jeremiah C Leary 7ab8f9f6fb Updating rule component_012 to improve code coverage:
1)  Removed unused elif code because it could never be executed.
  2)  Updated documentation for component classifier.
  3)  Updated tests for rule component_012 to cover the _get_solution method.
2020-01-02 10:10:38 -06:00
Jeremiah C Leary 0289a7840f Updating tests to improve code coverage. 2020-01-02 09:52:32 -06:00
Jeremiah Leary eb7b22a34b
Merge pull request #315 from m-kru/master
Fix case rules for instantiation rules.
2020-01-02 09:38:19 -06:00
Michał Kruszewski 380d6856f9 Fix case rules for instantiation rules. 2020-01-02 11:58:32 +01:00
Jeremiah Leary 0d42e6ff48
Merge pull request #313 from m-kru/master
Fix case rules for process rules.
2020-01-01 17:35:41 -06:00
Michał Kruszewski a35faba2b9 Fix case rules for process rules. 2019-12-31 12:41:08 +01:00
Jeremiah Leary f477bff5df
Merge pull request #311 from m-kru/master
Fix case rules for package rules.
2019-12-29 18:34:05 -06:00
Michał Kruszewski a27aaf56b8 Fix case rules for package rules. 2019-12-29 14:36:37 +01:00
Jeremiah Leary c3da762345
Merge pull request #309 from m-kru/master
Fix case rules for if_statement rules.
2019-12-28 10:56:11 -06:00