Commit Graph

52 Commits

Author SHA1 Message Date
Michał Kruszewski c6b7c3ee90 Split if_028. 2020-06-23 10:47:09 +02:00
Jeremiah C Leary 6b4a45791d Updates for issue #362
Changing utils.get_violation_linenumber to utils.get_violation_line_number.
2020-04-01 21:11:38 -05:00
Jeremiah C Leary e60c516548 Updates for Codacy and Codeclimate issues 2020-03-31 21:34:38 -05:00
Jeremiah C Leary b9abdf8a57 Updates for issue #362:
Updated rules to use consistent violation dictionary:

  1)  Updated check.indent_of_comments_above to use the violation dictionary
  2)  Updated rules to use the violation dictionary
  3)  Updated tests
2020-03-31 20:09:51 -05:00
Michał Kruszewski 9cab593876 Move comment rules 008 and 009 to if rules 032 and 033. 2020-03-29 12:46:52 +02:00
Jeremiah C Leary df72883c68 Updates for issue #335
Updated if rules to use violation dictionary for violation list.

  1)  Updated code
  2)  Updated tests
2020-02-16 19:44:42 -06:00
Jeremiah C Leary 1457ef9316 Updates for issue #335:
Updated tests using base rule vsg.rules.remove_blank_lines_above_rule to use the violations attribute as a list of violation dictionaries.

  1)  Updated code
  2)  Updated tests
2020-02-15 18:38:51 -06:00
Jeremiah C Leary 53969af391 Updates for issue #335
Updated rules based on rules.line_below_rule to use the violations attribute to fix violations.

  1)  Updated base rule rules.line_below_rule
  2)  Updated tests
2020-02-15 15:36:42 -06:00
Jeremiah C Leary 128b080f49 Updates for issue #335
Updated rules based on the line_above_rule.

  1)  Updated line_above_rule
  2)  Updated tests
2020-02-15 15:13:57 -06:00
Michał Kruszewski e3805c9d54 Replace extract_first_keyword calls with extract_words function. 2020-01-20 21:17:41 +01:00
Michał Kruszewski 9947bf187c Fix case rules for if_statement rules. 2019-12-28 11:48:06 +01:00
Michał Kruszewski 9f1389c8e8 Fix printing solution for case rules. 2019-10-15 15:57:01 +02:00
Michał Kruszewski c962881e7a Make _extract abstract method for case_rule class. 2019-10-07 20:30:27 +02:00
Michał Kruszewski 694625b024 Make case rule 014 use case_rule as a base. 2019-10-07 16:13:27 +02:00
Michał Kruszewski acd80aa131 Make if rule 027 use case_rule as a base. 2019-10-07 15:34:39 +02:00
Michał Kruszewski 3ab00dddd6 Make if rule 026 use case_rule as a base. 2019-10-07 15:32:55 +02:00
Michał Kruszewski 338d7cd3b5 Make if rule 025 use case_rule as a base. 2019-10-07 15:31:06 +02:00
Jeremiah C Leary f42e698c31 Updates for issue #219
Changed utilities to utils.
2019-03-23 07:43:53 -05:00
Jeremiah C Leary 6a04dae1c3 Updates for issue #181
1)  Adding vsg off checking to rules which override the base rule class analysis method.
2019-03-10 11:50:46 -05:00
Jeremiah C Leary 5ff634025c Updates for issue #181
Refactoring more rules to support implementing in file tags.
2019-03-09 16:42:31 -06:00
Jeremiah C Leary 9a68c25937 Fixing issues identified by Codacy. 2018-12-18 08:43:16 -06:00
Jeremiah C Leary e8de82199d Updates for codacy issues. 2018-12-12 15:45:40 -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 56419e0bde Updates for issue #109
Added if_030 to enforce at least one blank line after the last "end if" keyword.

  1)  Added rule
  2)  Added tests
  3)  Updated fixed code examples
  4)  Updated if spliting rules to clear the isLastEndIf line attribute
2018-12-06 16:52:35 -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
Ryan Fitzsimon 79456cf1a2 Use explicit relative imports
Implicit relative imports are not supported in Python 3 (see pep-0404).

Using explicit relative imports also helps avoid name clashes.
2018-08-31 11:24:13 +10:00
Jeremiah C Leary e4a7546f62 Refactoring if statement rules. 2017-12-26 17:24:02 -06:00
Jeremiah C Leary 37de340900 Updates for issue #130
1)  Refactored check and fix functions to take an **unless** parameter to allow for a single blank line.
  2)  Updated if rules 006, 007, 008, 010, and 011.
  3)  Updated tests
2017-12-26 17:05:00 -06:00
Jeremiah C Leary e09f02c492 Updating style issues to address Codacy issues. 2017-12-25 10:01:14 -06:00
Jeremiah C Leary 327f3a01e9 Updates for issue #122:
1)  Added if rules to lower case if, then, elsif, else, and end if keywords.
  2)  Added tests
  3)  Added documentation
2017-12-25 08:29:50 -06:00
Jeremiah C Leary 2c0aa6567d Refactored if statement rules and added documentation. 2017-12-21 20:00:18 -06:00
Jeremiah C Leary dbbb0bfb80 Updates for issue #117
1)  Fixed if rules to detect keywords next to semicolons and closing parenthesis.
2017-12-17 11:36:12 -06:00
Jeremiah C Leary 5a882a7475 Refactoring for code climate. 2017-12-16 09:59:34 -06:00
Jeremiah C Leary 6b7a486fc3 Updates for code style. 2017-12-15 09:06:32 -06:00
Jeremiah C Leary 185d891b77 Updates for issue #87 and #89
1)  Fixed when being classified as a sequential statement
  2)  Refactored if_022 and if_024
  3)  Added code example
  4)  Enhanced testing
2017-12-13 06:26:19 -06:00
Jeremiah C Leary efd8ad6334 Fixed issue where splitting line after then did not clear the isElseIfKeyword attribute. 2017-12-12 21:08:20 -06:00
Jeremiah C Leary f49cd58bad Updates for issue #77
1)  Additional classification added for return and variable assignments.
2017-12-12 20:18:31 -06:00
Jeremiah C Leary dea12145b6 Updates for issue #77
1)  Initial commit of code to fix indenting issue
  2)  Ranamed rules so they would execute in the correct order
  3)  Added documentation
  4)  Updated test cases
2017-12-12 19:59:45 -06:00
Jeremiah C Leary acb0c44b71 Updates for code climate:
1)  Refactored rules to reduce complexity.
2017-12-10 07:22:22 -06:00
Jeremiah C Leary 026d4fbcb0 Adding documentation for refactored rules. 2017-12-09 07:05:17 -06:00
Jeremiah C Leary b65ad81d27 Updates for code climate:
1)  Refactored process_010, concurrent_005, if_statement_012 and entity_012.
2017-12-08 21:53:32 -06:00
Jeremiah C Leary bf92c91551 Updates for codestyle. 2017-12-08 19:48:15 -06:00
Jeremiah C Leary 7da2f950de Updates for issue #99
1)  Removed unused self argument from split_line_[before|after] function.
2017-12-02 18:54:53 -06:00
Jeremiah C Leary a960dc68cb Updates for issue #90
1)  Created utilities.py
  2)  Moved _split_line_before_word and _split_line_after_word from rule.py to utilities.py
2017-11-30 06:27:23 -06:00
Jeremiah C Leary 618eeb135e Updates for issue #90
1)  move _remove_blank_lines_above and _remove_blank_lines_below to fix.py
2017-11-29 06:40:57 -06:00
Jeremiah C Leary 7ed5a6c5dd Updates for issue #90
1)  moved enforce_one_space_after_word and enforce_one_space_before_word to fix.py
2017-11-28 20:41:11 -06:00
Jeremiah C Leary 723ed891f7 Updates for issue #90
1)  moved _fix_multiline_alignment to fix.py
2017-11-28 20:14:01 -06:00
Jeremiah C Leary 3302988886 Updates for issue #90
1)  Moved _fix_indent to fix.py
2017-11-28 19:59:48 -06:00
Jeremiah C Leary b7a568d537 Updates for issue #90
1)  Moved _check_multiline_alignment to check.py
2017-11-28 19:32:53 -06:00
Jeremiah C Leary 7b1b4e64ab Updates for code climate:
1)  Refactored _ist_no_blank_line_* from rule.py into check.py
2017-11-26 16:22:23 -06:00