Continues Integration
Хорошая лень против плохой лени
Code sniffer
Level: Easy

Смотреть больно!
Code sniffer tasks
- Keep code follow D7 code standards
- Keep code commented more the less
- Keep some of Drupal practices
Pros
- Easy to install
- Easy to integrate with git/IDE/Text Editor Sublime
- Fast validation
How to install on *nix
# Make all bin from composer libraries executable
export PATH="$HOME/.composer/vendor/bin:$PATH"
# Install PHP Code Sniffer
composer global require squizlabs/php_codesniffer:'1.5.5'
# Install Coder module that contains recent Drupal standards
composer global require drupal/coder:'dev-7.x-2.x'
# Make Coder's standards available for PHPCS
ln -s ~/.composer/vendor/drupal/coder/coder_sniffer/Drupal\
~/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards
# Run PHP code sniffer
phpcs --report=full --standard=Drupal --extensions=php,inc,module,install\
sites/all/modules/customIntegration with Git
Integration with PHPStorm 8


Example on big project with tons of errors
FILE: .../ppl/dmjx/sites/all/modules/custom/propeople/ajax_pane/ajax_pane.module
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
48 | ERROR | Arguments with default values must be at the end of the argument
| | list
190 | ERROR | A cast statement must be followed by a single space
190 | ERROR | No space found after comma in function call
--------------------------------------------------------------------------------
FILE: ...dules/custom/propeople/dmjx_courses_service/dmjx_courses_service.module
--------------------------------------------------------------------------------
FOUND 9 ERROR(S) AND 2 WARNING(S) AFFECTING 10 LINE(S)
--------------------------------------------------------------------------------
9 | ERROR | Function comment short description must start with exactly one
| | space
16 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
29 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
29 | ERROR | 10 spaces found before inline comment; expected "// 'access
| | arguments' => array('access content')," but found "//
| | 'access arguments' => array('access content'),"
32 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
76 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
90 | WARNING | A comma should follow the last multiline array item. Found: )
101 | ERROR | Missing comment for param "$course_number" at position 1
105 | ERROR | Invalid @return data type, expected object but found stdClass
126 | ERROR | Function comment short description must start with exactly one
| | space
133 | WARNING | A comma should follow the last multiline array item. Found: )
--------------------------------------------------------------------------------
FILE: ...l/modules/custom/propeople/dmjx_custom_search/dmjx_custom_search.module
--------------------------------------------------------------------------------
FOUND 73 ERROR(S) AND 15 WARNING(S) AFFECTING 59 LINE(S)
--------------------------------------------------------------------------------
7 | WARNING | All constants defined by a module must be prefixed with the
| | module's name, expected
| | "DMJX_CUSTOM_SEARCH_DMJX_MEDIAJURE_TID" but found
| | "DMJX_MEDIAJURE_TID"
18 | ERROR | Missing function doc comment
31 | ERROR | Missing comment for @return statement
46 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
56 | ERROR | No space before comment text; expected "// AJAX "see more"
| | url" but found "//AJAX "see more" url"
56 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
94 | WARNING | A comma should follow the last multiline array item. Found: ]
138 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
162 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
196 | ERROR | There must be no space before the colon in a DEFAULT
| | statement
202 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
205 | ERROR | Missing parameter type at position 1
205 | ERROR | Missing comment for param "$form" at position 1
206 | ERROR | Missing parameter type at position 2
206 | ERROR | Missing comment for param "$form_state" at position 2
260 | ERROR | Missing parameter type at position 1
260 | ERROR | Missing comment for param "$string" at position 1
274 | ERROR | Inline comments must start with a capital letter
274 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
279 | ERROR | Inline comments must start with a capital letter
279 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
285 | ERROR | Function comment short description must end with a full stop
287 | ERROR | Missing parameter type at position 1
287 | ERROR | Missing comment for param "$form" at position 1
288 | ERROR | Missing parameter type at position 2
288 | ERROR | Missing comment for param "$form_state" at position 2
313 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
313 | ERROR | Function comment short description must end with a full stop
318 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
427 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
431 | ERROR | Expected 1 space before "="; 0 found
431 | ERROR | Expected 1 space after "="; 0 found
435 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
476 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
589 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
667 | WARNING | Avoid backslash escaping in translatable strings when
| | possible, use "" quotes instead
733 | WARNING | Avoid backslash escaping in translatable strings when
| | possible, use "" quotes instead
752 | WARNING | Hook implementations should not duplicate @param
| | documentation
752 | ERROR | Missing parameter type at position 1
752 | ERROR | Missing comment for param "$build" at position 1
753 | ERROR | Missing parameter type at position 2
753 | ERROR | Missing comment for param "$settings" at position 2
799 | WARNING | Only string literals should be passed to t() where possible
803 | ERROR | Inline comments must start with a capital letter
803 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
814 | WARNING | A comma should follow the last multiline array item. Found:
| | 'ss_field_course_location_person'
822 | ERROR | Missing function doc comment
830 | ERROR | Function comment short description must start with a capital
| | letter
830 | ERROR | Function comment short description must end with a full stop
848 | ERROR | Missing comment for @return statement
896 | ERROR | Missing function doc comment
900 | ERROR | Array closing indentation error, expected 2 spaces but found
| | 4
908 | ERROR | Missing function doc comment
911 | ERROR | Expected "foreach (...) {\n"; found "foreach (...) {\n"
915 | ERROR | Whitespace found at end of line
916 | ERROR | Inline comments must start with a capital letter
916 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
932 | WARNING | Hook implementations should not duplicate @param
| | documentation
932 | ERROR | There must be an empty line before the parameter block
932 | ERROR | Missing comment for param "$query" at position 1
937 | ERROR | No space before comment text; expected "//
| | $query->removeParam('fq');" but found
| | "//$query->removeParam('fq');"
946 | WARNING | Line exceeds 80 characters; contains 91 characters
946 | ERROR | No space before comment text; expected "// Choose items count
| | to show per page. Set in
| | /plugins/content_types/per_page_exposed.inc" but found
| | "//Choose items count to show per page. Set in
| | /plugins/content_types/per_page_exposed.inc"
952 | ERROR | No space before comment text; expected "//
| | $query->addFilter('bundle_name', 'Master Course');" but found
| | "//$query->addFilter('bundle_name', 'Master Course');"
953 | ERROR | Line indented incorrectly; expected 4 spaces, found 1
957 | ERROR | sizeof() is a function name alias, use count() instead
1011 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
1021 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
1066 | WARNING | Do not pass empty strings to t()
1107 | ERROR | There should be no white space after an opening "{"
1107 | WARNING | Line exceeds 80 characters; contains 83 characters
1107 | ERROR | Inline comments must start with a capital letter
1107 | ERROR | Comments may not appear after statements.
1117 | ERROR | There should be no white space after an opening "{"
1117 | WARNING | Line exceeds 80 characters; contains 97 characters
1117 | ERROR | Comments may not appear after statements.
1117 | ERROR | Inline comments must start with a capital letter
1118 | ERROR | No space before comment text; expected "// Create custom sort
| | for vacancies" but found "//Create custom sort for vacancies"
1118 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1133 | ERROR | Whitespace found at end of line
1147 | ERROR | No space before comment text; expected "// Add media tag
| | filter for Media articles search page" but found "//Add media
| | tag filter for Media articles search page"
1147 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1149 | ERROR | No space before comment text; expected "// Show first eight
| | results" but found "//Show first eight results"
1149 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1149 | ERROR | Comments may not appear after statements.
1151 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1160 | ERROR | Missing function doc comment
1164 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...ts/ppl/dmjx/sites/all/modules/custom/propeople/dmjx_fpt/dmjx_fpt.module
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
17 | ERROR | If the line declaring an array spans longer than 80 characters,
| | each element should be broken into its own line
30 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...google_analytics_search_track/dmjx_google_analytics_search_track.module
--------------------------------------------------------------------------------
FOUND 7 ERROR(S) AND 2 WARNING(S) AFFECTING 8 LINE(S)
--------------------------------------------------------------------------------
1 | ERROR | End of line character is invalid; expected "\n" but found
| | "\r\n"
2 | ERROR | Missing file doc comment
3 | WARNING | Line exceeds 80 characters; contains 97 characters
3 | 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.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
13 | ERROR | If the line declaring an array spans longer than 80 characters,
| | each element should be broken into its own line
18 | ERROR | Function comment short description must end with a full stop
19 | ERROR | Missing comment for @return statement
32 | ERROR | Space found before comma in function call
38 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: .../dmjx/sites/all/modules/custom/propeople/dmjx_helper/dmjx_helper.module
--------------------------------------------------------------------------------
FOUND 237 ERROR(S) AND 51 WARNING(S) AFFECTING 209 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
3 | WARNING | All constants defined by a module must be prefixed with the
| | module's name, expected "DMJX_HELPER_COURSE_WEBFORM_NID" but
| | found "COURSE_WEBFORM_NID"
4 | WARNING | All constants defined by a module must be prefixed with the
| | module's name, expected
| | "DMJX_HELPER_COURSE_WEBFORM_NID_COMPONENT_ID" but found
| | "COURSE_WEBFORM_NID_COMPONENT_ID"
18 | ERROR | Missing function doc comment
28 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
31 | ERROR | No space before comment text; expected "// Make English on
| | admin page, and Danish on content page" but found "//Make
| | English on admin page, and Danish on content page"
31 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
36 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
40 | ERROR | Inline comments must start with a capital letter
40 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
58 | ERROR | Inline comments must start with a capital letter
60 | ERROR | Line indented incorrectly; expected 4 spaces, found 0
60 | ERROR | 4 spaces found before inline comment; expected "//
| | die(var_dump($_SERVER));" but found "//
| | die(var_dump($_SERVER));"
65 | ERROR | Inline comments must start with a capital letter
66 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
76 | ERROR | No space before comment text; expected "// Add js file for
| | ajax load more functionality" but found "//Add js file for
| | ajax load more functionality"
76 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
81 | ERROR | Inline comments must start with a capital letter
81 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
88 | ERROR | Missing function doc comment
101 | ERROR | Missing function doc comment
111 | ERROR | Missing function doc comment
170 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
177 | ERROR | Inline comments must start with a capital letter
177 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
187 | ERROR | Inline comments must start with a capital letter
187 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
194 | ERROR | Inline comments must start with a capital letter
194 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
199 | ERROR | Inline comments must start with a capital letter
199 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
203 | ERROR | Inline comments must start with a capital letter
203 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
232 | WARNING | A comma should follow the last multiline array item. Found: )
248 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
263 | WARNING | Line exceeds 80 characters; contains 81 characters
281 | ERROR | Missing function doc comment
288 | ERROR | Missing function doc comment
312 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
316 | ERROR | Inline comments must start with a capital letter
316 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
318 | ERROR | No space before comment text; expected "// check if course
| | exists, if it does than change output of the submission" but
| | found "//check if course exists, if it does than change
| | output of the submission"
318 | ERROR | Inline comments must start with a capital letter
318 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
324 | ERROR | Inline comments must start with a capital letter
324 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
345 | ERROR | Inline comments must start with a capital letter
345 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
354 | ERROR | Function comment short description must end with a full stop
355 | ERROR | There must be an empty line before the parameter block
355 | ERROR | Missing comment for param "$form" at position 1
356 | ERROR | Missing comment for param "$form_state" at position 2
368 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
368 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
368 | ERROR | Function comment short description must end with a full stop
372 | ERROR | No space before comment text; expected "// Set hidden field
| | for contact us webform" but found "//Set hidden field for
| | contact us webform"
372 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
424 | ERROR | Inline comments must start with a capital letter
424 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
426 | ERROR | Inline comments must start with a capital letter
426 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
431 | ERROR | Inline comments must start with a capital letter
431 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
443 | ERROR | Inline comments must start with a capital letter
443 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
448 | ERROR | Inline comments must start with a capital letter
448 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
461 | WARNING | A comma should follow the last multiline array item. Found:
| | $course_ects
462 | WARNING | A comma should follow the last multiline array item. Found: )
465 | ERROR | Inline comments must start with a capital letter
465 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
468 | ERROR | Inline comments must start with a capital letter
468 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
474 | ERROR | Inline comments must start with a capital letter
474 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
482 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
484 | ERROR | Inline comments must start with a capital letter
484 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
492 | ERROR | Inline comments must start with a capital letter
492 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
506 | ERROR | Inline comments must start with a capital letter
506 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
509 | ERROR | Inline comments must start with a capital letter
509 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
512 | WARNING | A comma should follow the last multiline array item. Found: )
513 | WARNING | A comma should follow the last multiline array item. Found: )
516 | ERROR | Inline comments must start with a capital letter
517 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
526 | ERROR | Inline comments must start with a capital letter
526 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
536 | ERROR | No space before comment text; expected "// payer" but found
| | "//payer"
536 | ERROR | Inline comments must start with a capital letter
536 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
538 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
546 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
551 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
563 | WARNING | A comma should follow the last multiline array item. Found:
| | 'file'
579 | WARNING | Line exceeds 80 characters; contains 107 characters
591 | ERROR | There should be no white space after an opening "{"
591 | ERROR | There should be no white space before a closing "}"
591 | ERROR | Closing brace must be on a line by itself
596 | WARNING | A comma should follow the last multiline array item. Found:
| | $required_values
599 | WARNING | A comma should follow the last multiline array item. Found:
| | $required_values
606 | ERROR | Case breaking statements must be followed by a single blank
| | line
609 | ERROR | Use XHTML style <br /> tags instead of <br>
611 | ERROR | Case breaking statements must be followed by a single blank
| | line
613 | WARNING | Line exceeds 80 characters; contains 126 characters
614 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
618 | WARNING | A comma should follow the last multiline array item. Found: )
624 | WARNING | A comma should follow the last multiline array item. Found: )
641 | ERROR | Inline comments must start with a capital letter
641 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
657 | ERROR | If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own line
669 | WARNING | Line exceeds 80 characters; contains 101 characters
670 | ERROR | There must be an empty line before the parameter block
670 | ERROR | Missing parameter type at position 1
670 | ERROR | Missing comment for param "$form" at position 1
671 | ERROR | Missing parameter type at position 2
671 | ERROR | Missing comment for param "$form_state" at position 2
690 | WARNING | Only string literals should be passed to t() where possible
696 | ERROR | Function comment short description must end with a full stop
700 | ERROR | Inline comments must start with a capital letter
700 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
702 | WARNING | Line exceeds 80 characters; contains 89 characters
708 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
711 | WARNING | Line exceeds 80 characters; contains 88 characters
718 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
726 | ERROR | Inline comments must start with a capital letter
726 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
732 | ERROR | Inline comments must start with a capital letter
732 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
737 | ERROR | Inline comments must start with a capital letter
737 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
741 | ERROR | No space before comment text; expected "// Mandatory fields"
| | but found "//Mandatory fields"
741 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
744 | ERROR | Case breaking statements must be followed by a single blank
| | line
753 | ERROR | Line indented incorrectly; expected 6 spaces, found 8
757 | ERROR | Inline comments must start with a capital letter
757 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
764 | ERROR | Case breaking statements must be followed by a single blank
| | line
773 | ERROR | Inline comments must start with a capital letter
773 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
777 | ERROR | Inline comments must start with a capital letter
777 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
799 | ERROR | Inline comments must start with a capital letter
799 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
802 | ERROR | Case breaking statements must be followed by a single blank
| | line
805 | ERROR | Case breaking statements must be followed by a single blank
| | line
811 | ERROR | Case breaking statements must be followed by a single blank
| | line
814 | ERROR | Case breaking statements must be followed by a single blank
| | line
817 | ERROR | Case breaking statements must be followed by a single blank
| | line
820 | ERROR | Case breaking statements must be followed by a single blank
| | line
828 | ERROR | There must be no space before the colon in a CASE statement
831 | ERROR | Case breaking statements must be followed by a single blank
| | line
834 | ERROR | Case breaking statements must be followed by a single blank
| | line
835 | ERROR | Line indented incorrectly; expected 4 spaces, found 0
835 | ERROR | 4 spaces found before inline comment; expected "// case
| | (strpos($form_id, '_node_form') !== false):" but found "//
| | case (strpos($form_id, '_node_form') !== false):"
835 | ERROR | Inline comments must start with a capital letter
836 | ERROR | Line indented incorrectly; expected 4 spaces, found 0
836 | ERROR | Comment indentation error, expected only 4 spaces
837 | ERROR | Line indented incorrectly; expected 4 spaces, found 0
841 | ERROR | Case breaking statements must be followed by a single blank
| | line
847 | ERROR | Case breaking statements must be followed by a single blank
| | line
848 | ERROR | There must be no space before the colon in a DEFAULT
| | statement
854 | WARNING | Line exceeds 80 characters; contains 94 characters
856 | ERROR | Missing function doc comment
862 | WARNING | Avoid backslash escaping in translatable strings when
| | possible, use "" quotes instead
868 | ERROR | Function comment short description must end with a full stop
869 | ERROR | There must be an empty line before the parameter block
869 | ERROR | Missing comment for param "$form" at position 1
870 | ERROR | Missing comment for param "$form_state" at position 2
879 | ERROR | Inline comments must start with a capital letter
879 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
885 | WARNING | A comma should follow the last multiline array item. Found:
| | 'workplace_city'
893 | ERROR | Case breaking statements must be followed by a single blank
| | line
895 | ERROR | Inline comments must start with a capital letter
895 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
902 | WARNING | A comma should follow the last multiline array item. Found:
| | 'payer_city'
916 | ERROR | Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
918 | ERROR | Inline comments must start with a capital letter
918 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
924 | ERROR | Inline comments must start with a capital letter
924 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
936 | WARNING | A comma should follow the last multiline array item. Found:
| | $course_ects
937 | WARNING | A comma should follow the last multiline array item. Found: )
944 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
963 | WARNING | A comma should follow the last multiline array item. Found:
| | FALSE
968 | ERROR | Function comment short description must end with a full stop
969 | ERROR | Missing comment for @return statement
979 | WARNING | A comma should follow the last multiline array item. Found: )
986 | WARNING | A comma should follow the last multiline array item. Found: )
993 | WARNING | A comma should follow the last multiline array item. Found: )
1000 | WARNING | A comma should follow the last multiline array item. Found: )
1006 | ERROR | Missing function doc comment
1007 | ERROR | Language constructs must be followed by a single space;
| | expected 1 space but found 2
1011 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
1085 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
1147 | ERROR | Missing function doc comment
1181 | ERROR | Missing parameter type at position 1
1188 | WARNING | A comma should follow the last multiline array item. Found:
| | 'email'
1196 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
1196 | ERROR | Function comment short description must end with a full stop
1216 | ERROR | Inline comments must start with a capital letter
1217 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1217 | ERROR | Comment indentation error, expected only 1 spaces
1220 | ERROR | Missing function doc comment
1225 | ERROR | Missing function doc comment
1226 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1238 | ERROR | Missing function doc comment
1254 | ERROR | Missing function doc comment
1268 | ERROR | Missing function doc comment
1288 | ERROR | Missing function doc comment
1301 | ERROR | Missing function doc comment
1312 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
1343 | ERROR | Missing function doc comment
1385 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
1385 | ERROR | Function comment short description must end with a full stop
1392 | ERROR | Inline comments must start with a capital letter
1392 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1402 | ERROR | Inline comments must start with a capital letter
1402 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1419 | ERROR | Missing function doc comment
1420 | ERROR | Inline comments must start with a capital letter
1420 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1422 | ERROR | Inline comments must start with a capital letter
1422 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1427 | ERROR | Inline comments must start with a capital letter
1435 | ERROR | Missing function doc comment
1445 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____49___%'
1458 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____278__%'
1463 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____54___%'
1466 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____32___%'
1469 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____253__%'
1475 | WARNING | A comma should follow the last multiline array item. Found:
| | '_____614__%'
1500 | ERROR | Function comment short description must end with a full stop
1518 | WARNING | Line exceeds 80 characters; contains 85 characters
1518 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1518 | ERROR | 2 spaces found before inline comment; expected "//
| | $source_path .= ($person_json->Middlename) ?
| | $person_json->Middlename . ' ' : '';" but found "//
| | $source_path .= ($person_json->Middlename) ?
| | $person_json->Middlename . ' ' : '';"
1519 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1520 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1524 | WARNING | Empty return statement not required here
1528 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
1554 | WARNING | Line exceeds 80 characters; contains 90 characters
1555 | ERROR | There must be an empty line before the parameter block
1555 | ERROR | Last parameter comment requires a blank newline after it
1555 | ERROR | Missing parameter type at position 1
1556 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 1
1558 | ERROR | Return comment indentation must be 2 additional spaces
1562 | ERROR | No space before comment text; expected "// First cut tags."
| | but found "//First cut tags."
1572 | ERROR | No space before comment text; expected "// Then we must solve
| | problems with color" but found "//Then we must solve problems
| | with color"
1572 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1574 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1574 | ERROR | 2 spaces found before inline comment; expected "// //<font
| | color=..> cutting" but found "// //<font color=..> cutting"
1575 | WARNING | Line exceeds 80 characters; contains 87 characters
1575 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1576 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1576 | ERROR | Comment indentation error, expected only 2 spaces
1577 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
1578 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1583 | ERROR | No space before comment text; expected "// Remove empty text"
| | but found "//Remove empty text"
1583 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1584 | ERROR | Use XHTML style <br /> tags instead of <br>
1587 | ERROR | Use XHTML style <br /> tags instead of <br>
1597 | ERROR | Expected exactly one space after the function keyword
1598 | ERROR | No space before comment text; expected "// Look if it is an
| | updating feed(not new one)" but found "//Look if it is an
| | updating feed(not new one)"
1598 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
1623 | ERROR | There must be an empty line before the parameter block
1623 | ERROR | Missing parameter type at position 1
1624 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 1
1625 | ERROR | Last parameter comment requires a blank newline after it
1625 | ERROR | Missing parameter type at position 2
1626 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 2
1628 | ERROR | Return comment indentation must be 2 additional spaces
1643 | ERROR | There must be an empty line before the parameter block
1643 | ERROR | Missing parameter type at position 1
1644 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 1
1645 | ERROR | Missing parameter type at position 2
1646 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 2
1647 | ERROR | Missing parameter type at position 3
1648 | ERROR | Parameter comment indentation must be 2 additional spaces at
| | position 3
1685 | ERROR | Missing function doc comment
1686 | ERROR | Inline control structures are not allowed
1686 | ERROR | Expected 1 space before "=="; 0 found
1686 | ERROR | Expected 1 space after "=="; 0 found
1690 | ERROR | Missing function doc comment
1707 | ERROR | Missing function doc comment
1711 | ERROR | Missing function doc comment
1719 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...sites/all/modules/custom/propeople/dmjx_instagram/dmjx_instagram.module
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AND 1 WARNING(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
1 | WARNING | No PHP code was found in this file and short open tags are not
| | allowed by this install of PHP. This file may be using short
| | open tags but PHP does not allow them.
35 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...l/modules/custom/propeople/dmjx_master_course/dmjx_master_course.module
--------------------------------------------------------------------------------
FOUND 26 ERROR(S) AND 3 WARNING(S) AFFECTING 16 LINE(S)
--------------------------------------------------------------------------------
1 | ERROR | End of line character is invalid; expected "\n" but found
| | "\r\n"
2 | ERROR | Missing file doc comment
45 | ERROR | Function comment short description must end with a full stop
51 | ERROR | Expected "if (...) {\n"; found "if(...){\n"
58 | ERROR | Expected 1 space before "?"; 4 found
58 | ERROR | Expected 1 space before ":"; 4 found
59 | ERROR | Expected 1 space before "?"; 10 found
59 | ERROR | Expected 1 space before ":"; 10 found
59 | WARNING | A comma should follow the last multiline array item. Found: ''
70 | ERROR | Function comment short description must end with a full stop
76 | ERROR | Expected "if (...) {\n"; found "if(...){\n"
81 | ERROR | Expected "if (...) {\n"; found "if (...){\n"
81 | ERROR | There should be no white space after an opening "("
81 | ERROR | There should be no white space before a closing ")"
87 | ERROR | Expected 1 space before "?"; 19 found
87 | ERROR | Expected 1 space before ":"; 20 found
88 | ERROR | No space found after comma in function call
88 | ERROR | Expected 1 space before "?"; 7 found
88 | ERROR | Expected 1 space before ":"; 27 found
89 | ERROR | Expected 1 space before ":"; 2 found
90 | ERROR | No space found after comma in function call
90 | ERROR | Expected 1 space before "?"; 9 found
90 | ERROR | There should be no white space before a closing ")"
131 | WARNING | Line exceeds 80 characters; contains 96 characters
131 | ERROR | Inline comments must start with a capital letter
131 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
131 | ERROR | Comments may not appear after statements.
196 | WARNING | A comma should follow the last multiline array item. Found: )
202 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...custom/propeople/dmjx_master_course_sync/dmjx_master_course_sync.module
--------------------------------------------------------------------------------
FOUND 40 ERROR(S) AND 3 WARNING(S) AFFECTING 37 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | You must use "/**" style comments for a file comment
6 | ERROR | Missing function doc comment
13 | WARNING | A comma should follow the last multiline array item. Found: )
20 | ERROR | Missing function doc comment
21 | ERROR | Whitespace found at end of line
27 | ERROR | Whitespace found at end of line
34 | ERROR | Whitespace found at end of line
50 | ERROR | Missing function doc comment
60 | WARNING | Line exceeds 80 characters; contains 85 characters
62 | ERROR | Missing function doc comment
90 | ERROR | Missing function doc comment
119 | ERROR | Missing function doc comment
125 | ERROR | Missing function doc comment
132 | ERROR | Missing function doc comment
139 | ERROR | Whitespace found at end of line
140 | ERROR | Inline comments must start with a capital letter
141 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
171 | ERROR | Inline comments must start with a capital letter
171 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
179 | WARNING | A comma should follow the last multiline array item. Found: )
184 | ERROR | Inline comments must start with a capital letter
184 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
214 | ERROR | Missing function doc comment
223 | ERROR | Missing function doc comment
225 | ERROR | Whitespace found at end of line
229 | ERROR | Whitespace found at end of line
232 | ERROR | Whitespace found at end of line
247 | ERROR | Whitespace found at end of line
255 | ERROR | Missing function doc comment
257 | ERROR | Whitespace found at end of line
262 | ERROR | Whitespace found at end of line
271 | ERROR | Whitespace found at end of line
278 | ERROR | Whitespace found at end of line
284 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
287 | ERROR | Missing parameter type at position 1
287 | ERROR | Missing comment for param "$source" at position 1
288 | ERROR | Missing parameter type at position 2
288 | ERROR | Missing comment for param "$entity" at position 2
289 | ERROR | Missing parameter type at position 3
289 | ERROR | Missing comment for param "$target" at position 3
290 | ERROR | Missing parameter type at position 4
290 | ERROR | Missing comment for param "$value" at position 4
330 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...s/all/modules/custom/propeople/dmjx_newsletters/dmjx_newsletters.module
--------------------------------------------------------------------------------
FOUND 12 ERROR(S) AND 1 WARNING(S) AFFECTING 10 LINE(S)
--------------------------------------------------------------------------------
1 | ERROR | End of line character is invalid; expected "\n" but found
| | "\r\n"
3 | ERROR | The second line in the file doc comment must be " * @file"
4 | ERROR | The third line in the file doc comment must contain a
| | description and must not be indented
17 | 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.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
19 | ERROR | Missing parameter type at position 1
19 | ERROR | Missing comment for param "$node" at position 1
20 | ERROR | Last parameter comment requires a blank newline after it
20 | ERROR | Missing parameter type at position 2
20 | ERROR | Missing comment for param "$submission" at position 2
21 | ERROR | Missing comment for @return statement
30 | ERROR | Line indented incorrectly; expected 4 spaces, found 8
52 | ERROR | Missing function doc comment
58 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...modules/custom/propeople/webform_sql_encrypt/webform_sql_encrypt.module
--------------------------------------------------------------------------------
FOUND 51 ERROR(S) AND 11 WARNING(S) AFFECTING 42 LINE(S)
--------------------------------------------------------------------------------
2 | WARNING | All constants defined by a module must be prefixed with the
| | module's name, expected "WEBFORM_SQL_ENCRYPT_ENCRYPT_KEY" but
| | found "ENCRYPT_KEY"
2 | ERROR | Missing file doc comment
4 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
16 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
16 | ERROR | Function comment short description must end with a full stop
18 | ERROR | Whitespace found at end of line
37 | WARNING | Avoid backslash escaping in translatable strings when
| | possible, use "" quotes instead
38 | WARNING | Line exceeds 80 characters; contains 134 characters
38 | ERROR | Line indented incorrectly; expected 6 spaces, found 0
38 | ERROR | 8 spaces found before inline comment; expected "//
| | '#description' => t('!link to edit encryption settings.',
| | array('!link' => l('Click here',
| | 'admin/config/system/encrypt')))," but found "//
| | '#description' => t('!link to edit encryption settings.',
| | array('!link' => l('Click here',
| | 'admin/config/system/encrypt'))),"
47 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
47 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
58 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
58 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
67 | ERROR | Inline comments must end in full-stops, exclamation marks, or
| | question marks
73 | 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.", or "*
| | Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
73 | ERROR | Function comment short description must be on a single line,
| | further text should be a separate paragraph
80 | WARNING | Line exceeds 80 characters; contains 87 characters
80 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
81 | ERROR | Line indented incorrectly; expected 2 spaces, found 8
82 | ERROR | Line indented incorrectly; expected 2 spaces, found 6
84 | ERROR | Line indented incorrectly; expected 2 spaces, found 6
85 | WARNING | Line exceeds 80 characters; contains 143 characters
85 | ERROR | Line indented incorrectly; expected 2 spaces, found 8
86 | ERROR | Line indented incorrectly; expected 2 spaces, found 6
87 | ERROR | Line indented incorrectly; expected 2 spaces, found 6
88 | ERROR | Line indented incorrectly; expected 2 spaces, found 8
89 | ERROR | Line indented incorrectly; expected 2 spaces, found 6
90 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
97 | ERROR | Missing parameter type at position 1
120 | ERROR | Missing function doc comment
129 | ERROR | Whitespace found at end of line
135 | ERROR | Missing parameter type at position 1
135 | ERROR | Missing comment for param "$sid" at position 1
136 | ERROR | Missing parameter type at position 2
136 | ERROR | Missing comment for param "$nid" at position 2
137 | ERROR | Missing parameter type at position 3
137 | ERROR | Missing comment for param "$cid" at position 3
138 | ERROR | Last parameter comment requires a blank newline after it
138 | ERROR | Missing parameter type at position 4
138 | ERROR | Missing comment for param "$key" at position 4
139 | ERROR | Missing comment for @return statement
142 | WARNING | Line exceeds 80 characters; contains 104 characters
143 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
145 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
146 | ERROR | Whitespace found at end of line
148 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
154 | ERROR | Missing parameter type at position 1
154 | ERROR | Missing comment for param "$sid" at position 1
155 | ERROR | Missing parameter type at position 2
155 | ERROR | Missing comment for param "$nid" at position 2
156 | ERROR | Missing parameter type at position 3
156 | ERROR | Missing comment for param "$cid" at position 3
157 | ERROR | Missing parameter type at position 4
157 | ERROR | Missing comment for param "$key" at position 4
158 | ERROR | Missing parameter type at position 5
158 | ERROR | Missing comment for param "$field" at position 5
159 | ERROR | Function doc comment must end on the line before the function
| | definition
162 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
164 | ERROR | Line indented incorrectly; expected 2 spaces, found 4
166 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: ...tes/all/modules/custom/webform_views_select/webform_views_select.module
--------------------------------------------------------------------------------
FOUND 22 ERROR(S) AND 1 WARNING(S) AFFECTING 16 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
4 | ERROR | Expected 1 space(s) before asterisk; 0 found
5 | ERROR | Expected 1 space(s) before asterisk; 0 found
12 | ERROR | Missing function doc comment
15 | ERROR | No space found after comma in function call
15 | ERROR | Expected 1 space between comma and "'display_title'"; 0 found
16 | ERROR | No space found after comma in function call
17 | ERROR | No space found after comma in function call
20 | ERROR | Expected "while (...) {\n"; found "while(...) {\n"
21 | ERROR | Concat operator must be surrounded by spaces
21 | ERROR | Concat operator must be surrounded by spaces
22 | ERROR | Concat operator must be surrounded by spaces
22 | ERROR | Concat operator must be surrounded by spaces
24 | ERROR | Expected 1 space between "'view'" and double arrow; 0 found
24 | ERROR | Expected 1 space between double arrow and "$v"; 0 found
24 | ERROR | Expected 1 space before "=>"; 0 found
24 | ERROR | Expected 1 space after "=>"; 0 found
30 | ERROR | Missing function doc comment
37 | ERROR | Inline comments must start with a capital letter
42 | WARNING | A comma should follow the last multiline array item. Found: )
48 | ERROR | Expected "foreach (...) {\n"; found "foreach(...) {\n"
56 | ERROR | Files must end in a single new line character
56 | ERROR | The final ?> should be omitted from all code files
--------------------------------------------------------------------------------
1200 lines and it took 3 seconds
Cons
- If you have tons of old code you will have tons of errors
- If you don't know anything about Composer, PATH var, etc you will probably have to ask your Team Lead or MITKO™
- Some times you HAVE to write bad that won't be applied

Advanced usage
- Scss lints
- JShint / JSlint
- PHP mess detector
- Drupal security and best practices sniffers
Manual review
Everything MUST be reviewed by someone else
Level: Easy
Pros
- Knowledge and experience sharing
- Everybody on the project knows everything inside project
- Less bugs
- Juniors could review senior's code
Cons
- It takes more time
- It takes reviewer's time as well as commit author because of questions
- Haters gonna hate
- Unfortunately we have more projects then people and it's hard to know everything inside project
- Our team sets are bad structured because for example we have 1 themer and no-one could review him
Advanced usage
Ask another team to review you code ;)
Functional testing
It is Behat, baby!
Level: middle
Behat tasks
- Functional tests
- Reduce QA manual work
- Validate features before they are done
- !!! COVER EVERYTHING !!!
- Write project documentation
Instalation
# composer.json
{
"require": {
"drupal/drupal-extension": "1.0.0",
},
"config": {
"bin-dir": "bin/"
}
}
# Create behat.yml file with settings
# Go to tests directory
cd ./tests
# Install Drupal Behat Extension and all dependencies
composer install --no-interaction --prefer-source
# Run all tests
./tests/bin/behat --config ./tests/behat.travis.yml features/SearchPage.feature
Configuration
default:
paths:
features: 'features'
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: http://127.0.0.1:8888
files_path: ../../
Drupal\DrupalExtension\Extension:
blackbox: ~
api_driver: 'drupal'
drupal:
drupal_root: '../drupal_root'
drush:
alias: self
region_map:
Tabs: ".tabs.primary"Simple test example
@api @search
Feature: Search the site
In order to find courses on the site
I should be able to search for courses
@api @javascript
Scenario: Use the global search field
Given I am on the homepage
When I fill in "edit-keys" with "Course"
And I press "Search"
Then I should be on "search-courses/Course"
@api
Scenario: Check facets
Given I am on the homepage
And I press "Search"
Then I should see the text "Utbildningsform"
And I should see the text "Kursform"
And I should see the text "Skolor"
And I should see the text "Ämnesområden"
And I should see the text "Inriktning"
And I should see the text "Gymnasieprogram"
And I should see the text "Filtrera sökresultat"
And I should see the text "Kursstart, tider och veckodagar"
And I should see an "#edit-date" element
And I should see the text "Veckodagar"
And I should see the text "monday"Pros
- Less regression
- More documentation
- Cooler QAs
- Devs could write tests
- Main item for CI
Cons
- You have to know Behat&Mink
- You have to teach your QA to use Behat&Mink
- Javascript tests are slow
- Full set of tests are pretty slow
Advanced usage

Teach your QA and let him do everything!
Drupal profile
Build you site and stop to move databases
Level: middle
Profile buider tasks
- Store all required modules and core as metadata
- Store all patches and non custom modifications as metadata
- Automatically check if all modules, libraries, themes, etc are available
- Validate Drupal installation
- Store all settings in code because db is not the case
- Do not store useless stuff in code
- Remove way to hack the core *
Pros
Look at tasks
Cons
- Pretty difficult to start
- You will have to start love Features
- Rebuild process is slow on hige projects
- After project gone to live everything become complicated
- We have to build for every PR but it requires server power
Continues Integration
Automated flow
Level: advanced
CI
By Artyom Miroshnik
CI
Хорошая лень и плохая лень
- 1,066