Commit Graph

63 Commits

Author SHA1 Message Date
Jeremiah Leary b2a57f4c93 Refactored rules library_009 and comment_010 to use tokens.
1)  Added new methods to line.py
  2)  Copied fix.py to fix_item.py to mirror function that use tokens
2020-08-09 12:17:29 -05:00
Jeremiah Leary e42d0a3002 Updates for issue #393:
Adding more context rules:

  1)  Added base rule indent_item_rule
  2)  Added indent rules
  3)  Updated classifiers to handle context indents
2020-07-22 18:48:33 -05:00
Jeremiah Leary d1ae9928c3 Updates for issue #393:
Adding new rules for context declarations:

  1)  Added context rule documentation
  2)  Added parsing of context declarations
      a)  Experimenting with using objects
  3)  Adding rules 002, 003, 004 and 005.

NOTE:  These new rules need to be refactored before they are merged back to master.
2020-07-19 16:01:29 -05:00
Jeremiah Leary 7a3fcf9883 Updates for issue #434:
Adding rules to align declaration identifiers:

  1)  Updated documentation
  2)  Removed the following rules
      file_003, constant_003, attribute_003, signal_003, subtype_003, type_003 and variable_003
  3)  Added new rules:
      architecture_029, function_015, package_019, procedure_010 and process_037
  4)  Added tests for new rules
  5)  Updated classifiers to support new rules
2020-06-30 11:36:01 -05:00
Jeremiah Leary 02b3835381 Updates for issue #432:
Adding rule architecture_029 to align idenifiers in signal, constant, variable, file, type and subtype declarations.

  1)  Updated documentation
  2)  Added tests
  3)  line class updates
      a)  Added new architecture attribute
      b)  Added new method to update the line attributes from tokens
  4)  Added rule architecture_029
2020-06-25 09:58:49 -05:00
Jeremiah Leary c41bbc1dc5 Updates for issue #427:
VSG was not handling more than two port assignments on a single line correctly for rule instantiation_021:

  1)  Updated tests to expose issue
  2)  Added tokenizing logic
  3)  Added three new utility functions
      a) extract_port_assignments
      b) extract_string_before_string
      c) extract_string_after_string
  4)  Updated code to handle multiple port assignments correctly
2020-06-21 09:21:38 -05:00
Jeremiah C Leary 960fc7d3a7 Fixing import error for python 2.7. 2020-06-06 19:52:02 -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 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 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 9271a2ad4f Revert "Updates for issue #312:"
This reverts commit e3f6263df7.
2020-01-06 20:49:20 -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 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 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 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 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 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 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 51a4aac729 Updates for issue #227
Adding check for loop label.
2019-04-09 18:58:02 -05:00
Jeremiah C Leary f42e698c31 Updates for issue #219
Changed utilities to utils.
2019-03-23 07:43:53 -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 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 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 317c728d6e Adding wait_001 rule to handle indenting of wait statements.
1)  Added tests
  2)  Added docmentation
  3)  Added rule
2018-12-01 11:03:11 -06:00
Jeremiah C Leary 510ba10e8c Updates for issue #161
Adding initial support for blocks:

  1)  block structures are now detected
  2)  indenting enforced

NOTE:  extensive testing of structures within a block have not been tested.
2018-09-12 20:53:05 -05:00
Jeremiah C Leary a142f78ef2 Updates for issue #133:
1)  Updated classification of functions.
  2)  Updated tests
2017-12-30 12:27:23 -06:00
Jeremiah C Leary 4710c436b7 Updates for issue #132:
1)  Updated classification of procedures
  2)  Updated tests
  3)  Added procedure_005 rule
  4)  Updated documentation
2017-12-30 09:31:22 -06:00
Jeremiah C Leary f61ca71212 Updates for issue #126
1)  Added classification for multiline constants
  2)  Added constant_012 rule
  3)  Added tests
  4)  Added documentation
2017-12-27 14:18:13 -06:00
Jeremiah C Leary a0033246c7 Updates for issue #129
1)  Added classification of procedures
   2)  Added procedure rules 001, 002, 003, and 004.
   3)  Added tests
   4)  Added documentation
2017-12-27 11:56:25 -06:00
Jeremiah C Leary 86ec8e697e Updates for issue #84
1) Added function_008 and function_009
  2) Added tests
  3) Added documentation
2017-12-25 12:45:01 -06:00
Jeremiah C Leary 1145cda18f Updates for issue #124
1)  Added file statement attributes to line.py
  2)  Added file statement classifier
  3)  Added file statement rules
  4)  Added tests
  5)  Added documentation
2017-12-25 11:24:06 -06:00
Jeremiah C Leary 03636fe358 Updates for issue #123
1)  Added attribute attributes to line.py
  2)  Added attribute classifier
  3)  Added attribute rules
  4)  Added tests
  5)  Added documentation
2017-12-25 09:50:45 -06:00
Jeremiah C Leary ec85925bdc Updates for issue #121:
1)  Added attributes specific to enumerated types
  2)  Updated rules accordingly
  3)  Updated tests
2017-12-24 16:54:15 -06:00
Jeremiah C Leary 4d312ff8f1 Adding docstrings. 2017-12-24 09:12:32 -06:00
Jeremiah C Leary fb09a153a7 Refactored process rules. 2017-12-23 13:36:08 -06:00
Jeremiah C Leary 40ca454f2f Updates for issue #120
1)  Added type_012
  2)  Fixed type_008, which was causing issue
  3)  Added tests
  4)  Added documentation
2017-12-21 18:15:58 -06:00
Jeremiah C Leary 515913197c Updates for issue #119
1)  Added array type classification
  2)  Prevented type_008 from moving closing ); to next line
  3)  Updated tests
2017-12-21 13:18:12 -06:00
Jeremiah C Leary 103248b97c Updates for issue #118
1)  Added instantiation_027 and instantiation_028
  2)  Added documentation
  3)  Added tests
2017-12-20 22:28:14 -06:00
Jeremiah C Leary 59864c2d00 Refactoring issues found by code climate. 2017-12-15 09:29:40 -06:00
Jeremiah C Leary 071010fb3e Updates for rule #73
1)  Added rule with_001
  2)  Added tests
  3)  Added documentation
2017-12-14 08:42:39 -06:00
Jeremiah C Leary 796879e240 Updates for style. 2017-12-10 06:52:33 -06:00
Jeremiah C Leary 96d9fc9608 Updates for code example c16. 2017-12-09 21:05:50 -06:00
Jeremiah C Leary 006ad3a616 Updates for issue #107
1)  Added classifier for while loops
  2)  Updated existing classifiers to handle while loops
  3)  Added tests
  4)  Added documentation
  5)  Added two rules for while loops
2017-12-06 19:53:30 -06:00
Jeremiah C Leary 0cc31c9903 Updates for issue #108
1)  subtypes are classified now
  2)  created tests
  3)  Added fix
  4)  Added documentation
2017-12-05 21:32:18 -06:00
Jeremiah C Leary d9bb061050 Updates for issue #104
1)  Created new attribute on the line class that holds line contents with comments.
      This will allow the classifiers to ignore anyting in comments.
  2)  Updated documentation:
      a)  Added instantiation_014 documentation
      b)  Updated architecture documentation
      Still trying out different options.
2017-12-03 21:10:30 -06:00
Jeremiah C Leary 0df27ef020 Updates for issue #71
1)  Added classification for assert statements
  2)  Added indent rule
  3)  Added test for assert statements
2017-12-03 07:17:29 -06:00