Commit Graph

185 Commits

Author SHA1 Message Date
Jeremiah Leary 1c1dc3ccd0 Adding generic clause objects. 2020-08-02 11:19:42 -05:00
Jeremiah Leary f32d4e1a1b Adding component objects.
Refactoring objects into a token library instead of a parser file.
2020-08-02 08:48:18 -05:00
Jeremiah Leary b993b2a746 Adding attribute objects. 2020-08-01 18:57:21 -05:00
Jeremiah Leary edc846b549 Added file objects.
Cleaned up some issues with classifiers not checking lower case for keywords.
2020-08-01 18:36:57 -05:00
Jeremiah Leary 16e8c1cb27 Adding variable declaration objects. 2020-08-01 16:48:03 -05:00
Jeremiah Leary ed26959607 Adding assert objects. 2020-08-01 15:24:07 -05:00
Jeremiah Leary 4013b5a783 Adding objects for constants. 2020-07-31 21:27:32 -05:00
Jeremiah Leary 0543b7c198 Added parsing of signals into objects. 2020-07-31 21:01:42 -05:00
Jeremiah Leary d4d9a1460e Adding objects for package bodies. 2020-07-31 15:57:10 -05:00
Jeremiah Leary 585fedfc7a Adding parsing of entity into objects. 2020-07-31 12:33:08 -05:00
Jeremiah Leary 7b61836e8b Adding parsing of architecture elements into objects using the parser. 2020-07-31 10:58:59 -05:00
Jeremiah Leary ffaa52ce6d Merge branch 'master' into issue-393 2020-07-30 20:45:48 -05:00
Jeremiah Leary 33c1136171 Updates for issue #441:
Addressing issue where commented out generic map was being treated as code.

  1)  Updated test to show issue
  2)  Updated code to address issue
2020-07-28 08:18:20 -05:00
Jeremiah Leary abe3cb3418 Updates for issue #393:
Refactoring of library and base rules:

  1)  Most library rules refactored to use new base item rules
  2)  Base item rules refactored to use the region method on vhdlFile
  3)  Tests updated
  4)  Documentation updated
2020-07-26 12:54:43 -05:00
Jeremiah Leary 711507a2f4 Updates for issue #393:
Add ability to parse context references:

  1)  Added parser classes
  2)  Added test
  3)  Modified context classifier to handle context references
2020-07-25 15:06:01 -05:00
Jeremiah Leary 0e226ec6de Updates for issue #393:
Additional context rules added:

  1)  New rules added
      a)  context_007
      b)  context_021
      c)  context_022

  2)  New base rules added
      a)  insert_item_after_item_rule
      b)  copy_item_value_and_insert_new_item_after_item_rule
      c)  move_items_after_item_to_next_line_rule

  3)  Updated classifiers to use objects
      a)  library
      b)  use

  4)  Added tests
2020-07-21 07:45:20 -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 0c8ee8da31 Updates for issue #404:
Fixing issue where signal_015 would crash if commas existed after the : in the signal declaration.

  1)  Adding test to expose issue
  2)  Updated rule signal_015 to make the test pass

(cherry picked from commit 305124a55f8deb038ec32b63e3553c382e05f81d)
2020-07-18 11:47:55 -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 16503930e6 Updates for issue #420:
VSG was considering commas inside parenthesis as a delimiter for a port inside an instantiation.

  1)  Updated tests to expose the issue
  2)  Updated code to make test pass
2020-06-20 13:17:19 -05:00
Jeremiah Leary 4fb3977407 Merge branch 'master' of https://github.com/jeremiah-c-leary/vhdl-style-guide 2020-05-18 22:14:04 -05:00
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
Michał Kruszewski c5eb7737ec Add suffix and prefix rules for package identifier. 2020-05-17 15:46:12 +02:00
Jeremiah Leary ae97c39b9f Updates for issue #394:
Rule signal_015 did not ignore commas in comments.

  1)  Updated test to expose issue
  2)  Updated code to fix issue
2020-05-11 20:44:03 -05:00
Jeremiah Leary ddcb70f047 Removing unused test file. 2020-05-10 07:14:59 -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 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
Michał Kruszewski d90e126c87 Move comment rule 005 to case rule 021. 2020-03-29 11:40:03 +02:00
Michał Kruszewski 1ba47f234c Move comment rule 001 to library rule 009. 2020-03-29 09:21:15 +02: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
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
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 c71e025878 Updates for issue #258
Rule architecture_014 would not uppercase the entity name if it matched the architecture name.

  1)  Updated tests
  2)  Updated rule architecture_014
2019-10-15 18:06:09 -05:00
Jeremiah C Leary 8c941aca26 Updates for issue #272
Rule instantiation_014 was removing all trailing closing parenthesis when it moved the closing parenthesis to the next line.

  1)  Updated tests
  2)  Updated rule instantiation_014 to remove only the last closing parenthesis.
2019-10-14 21:49:11 -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 24cc35f7f1 Updates for issue #248:
Updating after tests to include after 1 ns in reset process.
2019-09-08 06:10:27 -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