Commit Graph

122 Commits

Author SHA1 Message Date
Jeremiah Leary 16126b045d Updates for issue #398:
Generics starting with "port" were classified as the port keyword:

  1)  Updated tests to expose issue
  2)  Updated code to make tests pass
2020-05-18 22:12:21 -05:00
Jeremiah Leary 3fb73a1e43 Updates for issue #392:
Adding support for case generate statements:

  1)  Updated case classifications to differentiate between generate and case statements
  2)  Updated documentation
  3)  Added tests for generate case statements
  4)  Added rule generate_016 to enforce indention on when statements
2020-05-09 21:59:17 -05:00
Jeremiah Leary 16968a115e Updates for issue #391:
VSG was mistaking case-generates for an instantiation.

  1)  Updated tests to include case generate example
  2)  Updated code to recognize a case generate statement
2020-05-09 15:45:22 -05:00
Jeremiah Leary de942890b3 Updates for issue #385:
The rule process_031 was attempting to align variables defined in function and procedures with variables outside functions and procedures in the process declarative region.

  1)  Updated tests to expose issue
  2)  Fixed to make tests pass

Additional issue found with handling indents on processes with just 'process is' when updating tests.

  1)  Fixed code to make tests pass
2020-05-09 09:12:19 -05:00
Jeremiah Leary 09b7a9666b Updates for issue #384:
Fixing issue where VSG was classifying <= in an assert statement.

  1)  Added tests to show the issue
  2)  Updated code to address the issue
2020-05-07 21:38:11 -05:00
Jeremiah Leary a3a3c68721 Updates for issue #383:
VSG was considering an 'end if' in a procedure to be the 'end procedure'.

  1)  Updated tests to reveal issue
  2)  Updated code to make tests pass
2020-05-05 20:41:31 -05:00
Jeremiah Leary 3ea1035b03 Updates for issue #383:
VSG could not handle nested for loops if it was inside a procedure.
The second 'end loop' would also be classified as the 'end procedure'.

  1)  Updated tests to expose issue
  2)  Updated code to make tests pass
2020-05-04 20:06:12 -05:00
Jeremiah Leary 6056c9df9d Updates for issue #382:
VSG was classifying the when keyword in a sequential assignment as a case when keyword.

  1)  Updated tests to detect the issue
  2)  Updated code to make test pass
2020-05-01 18:36:23 -05:00
Jeremiah Leary 88ee68bf72 Updates for issue #380:
The 'end loop' was being misclassified as the end of a procedure.
This would result in a cascade of issues in the fixed code.

  1)  Updated tests to include a for loop within a procedure within an architecture declarative region to replicate the issue
  2)  Updated code to not classify the 'end loop' as the end of a procedure.
2020-04-30 10:30:07 -05:00
Jeremiah Leary cafe651a15 Updates for issue #379:
Rule process_019 was not honoring records.

  1)  Updated tests
  2)  Updated clock detection
  3)  Update rule process_019
2020-04-27 20:20:51 -05:00
Jeremiah C Leary 7d940306ec Updates for issue #314 and issue #333:
Issue #314:

Updated all label rules to use utils.extract_label or utils.extract_end_label:

  1) Added utils.extract_end_label
  2) Added more end label attributes to line.py
  3) Updated classifiers to set the new end label attributes
  4) Updated tests
  5) Updated rules to use utils.extract_label or utils.extract_end_label

Issue #333:

Fixed bug where nested generate labels were not updated correctly:

  1)  Added test case
  2)  Updated code
2020-02-23 10:51:44 -06:00
Jeremiah Leary 322050acc1
Merge pull request #329 from willkamp/quickfixes
Fixes required to handle double hyphens in quoted strings so they are not considered a comment marker.
2020-01-24 11:34:59 -06:00
Will Kamp 36b1ba9065 Update comment detection regex. 2020-01-08 17:47:01 +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 f684b4b0a7 Updates for issue #319:
Added ability to configure either 'event or _edge for clock definitions:

  1)  Updated documentation
  2)  Added isClockDefinition to line object
  3)  Updated process classification to set isClockDefinition
  4)  Updated tests
  5)  Updated rule process_029
2020-01-06 22:18:07 -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 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 f0c474c695 Updates for issue #280:
The rule process_012 would add the *is* keyword to the end of the process sensitivity list without removing an *is* keyword if it existed on a different line.

  1)  Updated documentation
  2)  Updated tests
  3)  Updated process classifier
  4)  Added isProcessIs line attribute
  5)  Updated rule process_012 to remove the *is* keyword if is exists on a seperate line.
2019-12-05 09:52:59 -06:00
Jeremiah C Leary 5cb0a35cc9 Updates for issue #287:
Fixed two issues:

  1)  VSG was misclassifying function parameters as variables.
  2)  VSG was not setting an indent level for the end of a function.
2019-11-27 07:13:29 -06:00
Jeremiah C Leary 5696c3a678 Updates for issue #282:
Adding rule signal_015 to handle a signal declared over multiple lines:

  1)  Added documentation
  2)  Added test
  3)  Added rule signal_015

NOTE:  Only the detection portion has been added.  The fix will be added next.
2019-11-03 20:06:38 -06:00
Jeremiah C Leary 0e2d48fa47 Updates for issue #282:
Adding new line attributes to cover signal assignments spanning multiple lines.
2019-11-03 07:00:41 -06:00
Jeremiah C Leary 791021b799 Updates for issue #284:
The indent level of the begin keyword was incorrect in cases of processes without sensitivity lists.

  1)  Changed indent level to match that of the process keyword in all cases.
  2)  Updated tests
2019-10-20 07:20:49 -05:00
Jeremiah C Leary cb608ff9a3 Updates for issue #275
The constant classifier was classifying signals in concurrent assignments as constants if a signal started with "constant".

  1)  Updated tests
  2)  Updated constant classifier
2019-10-15 18:19:03 -05:00
Jeremiah C Leary a6d82e7bbe Updates for issue #248:
Updated the process classifier to update the insideResetProcess line attribute.
2019-09-08 06:40:01 -05:00
Jeremiah C Leary 41653e3cba Updates for issue #251:
Fixed issue where ports in an instantiation which started with "end" were classified as the end of the architecture.
Fixed issue where concurrent assignments which started with "end" were classified as the end of the architecture.

  1)  Added tests
  2)  Updated architecture classifier
2019-09-07 07:57:01 -05:00
Jeremiah C Leary 952e4771b9 Update for issue #196:
Added fix logic for rule after_001.
  1)  Added configurable attributes magnitude and units
  2)  Updated documentation
  3)  Updated tests
  4)  Updated clock process classification to detect clock processes without resets
2019-06-28 18:43:40 -05:00
Jeremiah C Leary e6ff07855c Updates for issue #196
Adding test for after statement in clock process:

  1)  Enhanced testing
  2)  Added after_001 rule
  3)  Updated documentation
  4)  Fixed bug in detecting the end of a sequential statement
  5)  Updated classification logic
2019-06-28 15:12:44 -05:00
Jeremiah C Leary 43e708cf16 Updates for issue #195:
1)  Added classification of clock processes
  2)  Added classification for after keyword
  3)  Added tests to validate classifications
2019-06-09 21:08:47 -05:00
Jeremiah C Leary a7d0aa556d Updates for issue #237
Added rule constant_014 to handle multiline non array constants:

  1)  Added documentation
  2)  Fixed rule constant_012 so it does not fire on non array constants
  3)  Added rule constant_014
  4)  Added tests
  5)  Added classification of array constants
2019-06-08 11:22:31 -05:00
Jeremiah C Leary 7c68c55ca5 Updates for issue #236:
Updated assert_001 to indent everything after the assert statement.

  1)  Updated documentation
  2)  Updated tests
  3)  Updated assert_001 rule
2019-06-07 22:32:08 -05:00
Jeremiah C Leary 546d8fe2c7 Adding comments to for loop classifier. 2019-04-10 07:56:03 -05:00
Jeremiah C Leary 51a4aac729 Updates for issue #227
Adding check for loop label.
2019-04-09 18:58:02 -05:00
Jeremiah C Leary 63787d4c78 Updates for issue #225
Added rules to handle the component keyword in component instantiations:

  1)  Enforce component keyword to lowercase
      a)  Added documentation
      b)  Added test
      c)  Added rule instantiation_031
      d)  This rule is disabled by default
  2)  Enforce a single space after the component keyword
      a)  Added documentation
      b)  Added test
      c)  Added rule instantiation_032
      d)  This rule is disabled by default
  3)  Remove component keyword
      a)  Added documentation
      b)  Added test
      c)  Added rule instantiation_033
2019-04-02 21:26:13 -05:00
Jeremiah C Leary 74778a393d Updates for issue #220:
Completed bug fix:

  1)  Added rule procedure_006
      a)  Added documentation
      b)  Added test
      c)  Added rule
  2)  Fixed misclassification of procedure parameters as variable assignments
      a)  Enhanced tests for procedures
      b)  Enhanced tests for variable_assignments
      c)  Fixed variable_assignment classifier to ignore component parameters
2019-03-23 07:29:22 -05:00
Jeremiah C Leary 65159fcb0b Updates for issue #220
Adding test case to procedure tests.

  1)  Updated meaning of isProcedureParameterEnd.
2019-03-22 17:52:04 -05:00
Jeremiah C Leary 6f7ae69e55 Updates for issue #220:
Invalid classification of procedure "begin" keyword as a process "begin" keyword.

  1)  Updated tests to include testcase
  2)  Updated code to handle testcase
2019-03-22 17:26:42 -05:00
Jeremiah C Leary f2f0ac5bc9 Updates for issue #181
Adding code tag classifier.
2019-03-10 11:09:02 -05:00
Jeremiah C Leary 47e14761f9 Updates for issue #214:
1)  Restricted classification of file keyword to include a space afterwards.
  2)  Updated tests
2019-03-09 09:59:01 -06:00
Jeremiah C Leary 48563434cd Updates to address codeclimate issues. 2019-03-02 09:29:53 -06:00
Jeremiah C Leary a974530bb5 Updates for issue #204
Added rule to handle generate label and generate keyword not on the same line:

  1)  Added generate_015 to flag label and keyword not on the same line
  2)  Added tests
  3)  Added documentation
  4)  Improved classification of generates to detect label and keyword not on the same line

NOTE:  This is currently not fixable.
2019-03-02 08:57:01 -06:00
Jeremiah C Leary 3f094345a2 Updates for issue #208
1)  Added "when" attributes to line object
  2)  Added classification of "when" constructs
  3)  Added tests
2019-02-17 09:28:19 -06:00
Jeremiah C Leary 5f5eee4571 Updates for issue #203
Made process detection ignore commented out code.

  1)  Updated test
  2)  Updated classifier
2019-02-11 18:13:50 -06:00
Jeremiah C Leary 436d5c7bb7 Updates for issue #198
Fixed issue when signal names starting with "end_" were classified as an architecture end:

  1)  Added test
  2)  Updated classification
2019-02-05 16:34:07 -06:00
Jeremiah C Leary ec35a15d3a Updates for issue #191
Added rules case_019 and case_020 to remove labels on case statements:

  1)  Added rule case_019
  2)  Added rule case_020
  3)  Added documentation
  4)  Added tests
  5)  Fixed mis-classification of cases with labels
2018-12-12 19:03:15 -06:00
Jeremiah C Leary 3123a1ff7f Updates for issue #188
Added feature to ensure a blank line before the first "if" statement unless there is a comment.

  1)  Added tests
  2)  Added documentation
  3)  Updated tests to match new rule
2018-12-12 09:54:25 -06:00
Jeremiah C Leary 3af2b46496 Updates for issue #109:
Blank line after "end if" keyword is now enforced.

  1)  Added test case
  2)  Updated documentation
  3)  Added rule
2018-12-03 19:53:51 -06:00
Jeremiah C Leary c031527690 Updates for issue #186
1)  Made end architecture more restrictive.
  2)  Updated tests
2018-12-03 19:26:57 -06:00