Fix line endings and a few other code sniffer issues.

Comments

jcandan created an issue. See original summary.

jcandan’s picture

This patch fixes all issues reported by Code Sniffer.

jcandan’s picture

The patch from #2 addresses the following code sniffer issues:

FILE: /app/web/modules/contrib/group_mapping_from_node/group_mapping_from_node.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------


FILE: /app/web/modules/contrib/group_mapping_from_node/group_mapping_from_node.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AND 18 WARNINGS AFFECTING 32 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   5 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
   6 | ERROR   | [x] There must be exactly one blank line after the file comment
   7 | WARNING | [x] Unused use statement
  10 | WARNING | [x] Unused use statement
  11 | WARNING | [x] Unused use statement
  12 | WARNING | [x] Unused use statement
  14 | WARNING | [x] Unused use statement
  15 | WARNING | [x] Unused use statement
  16 | WARNING | [x] Unused use statement
  17 | WARNING | [x] Unused use statement
  18 | WARNING | [x] Unused use statement
  25 | ERROR   | [x] Additional blank lines found at end of doc comment
  29 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
  38 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
  51 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  61 | ERROR   | [x] Whitespace found at end of line
  80 | ERROR   | [x] Whitespace found at end of line
  91 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for
     |         |     xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
  97 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 102 | ERROR   | [x] Whitespace found at end of line
 121 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
 130 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
 133 | WARNING | [ ] Unused variable $default_group.
 139 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 139 | ERROR   | [x] Expected 1 space after comma in function call; 2 found
 139 | ERROR   | [x] Expected one space after the comma, 2 found
 140 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 142 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
 156 | WARNING | [x] A comma should follow the last multiline array item. Found: )
 169 | ERROR   | [x] Additional blank lines found at end of doc comment
 172 | ERROR   | [x] Whitespace found at end of line
 175 | ERROR   | [x] No space found before comment text; expected "// $entity->group = $entity->group['group'];" but found "//$entity->group = $entity->group['group'];"
 177 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8

  • jcandan committed 0049f64 on 8.x-1.x
    Issue #3083366 by jcandan: Fixed all coding standards issues.
    
jcandan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.