When running the module code against Drupal coding standards based on Drupal standard, the module shows errors / warnings
FILE: ...password_policy/password_policy_test/password_policy_test.module
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | ERROR | [x] Missing function doc comment, only found file
| | comment
28 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ion-sites/drupal-7/password_policy/plugins/condition/authmap.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...bution-sites/drupal-7/password_policy/plugins/condition/role.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...sites/drupal-7/password_policy/plugins/constraint/alpha_case.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...-sites/drupal-7/password_policy/plugins/constraint/blacklist.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...tes/drupal-7/password_policy/plugins/constraint/symbol_count.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal-7/password_policy/plugins/constraint/drupal_strength.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...-sites/drupal-7/password_policy/plugins/constraint/int_count.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/drupal-7/password_policy/plugins/constraint/past_passwords.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...sites/drupal-7/password_policy/plugins/constraint/char_count.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...n-sites/drupal-7/password_policy/plugins/constraint/username.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ites/drupal-7/password_policy/plugins/constraint/alpha_count.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...tion-sites/drupal-7/password_policy/plugins/constraint/delay.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ites/drupal-7/password_policy/plugins/constraint/consecutive.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ntibution-sites/drupal-7/password_policy/plugins/item/expire.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
167 | WARNING | [ ] Line exceeds 80 characters; contains 155
| | characters
167 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/drupal-7/password_policy/plugins/export_ui/password_policy.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
12 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, colons, question marks, or closing
| | parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ontibution-sites/drupal-7/password_policy/password_policy.module
----------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
224 | ERROR | [x] Array indentation error, expected 8 spaces but
| | found 10
225 | ERROR | [x] Array indentation error, expected 8 spaces but
| | found 10
226 | ERROR | [x] Array indentation error, expected 8 spaces but
| | found 10
229 | ERROR | [x] Array closing indentation error, expected 6 spaces
| | but found 8
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...-contibution-sites/drupal-7/password_policy/password_policy.test
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
591 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ntibution-sites/drupal-7/password_policy/password_policy.install
----------------------------------------------------------------------
FOUND 14 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
29 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
209 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
210 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
211 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
212 | ERROR | [x] Array indentation error, expected 6 spaces but
| | found 8
213 | ERROR | [x] Array closing indentation error, expected 4 spaces
| | but found 6
219 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
220 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
221 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
222 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
223 | ERROR | [x] Array indentation error, expected 4 spaces but
| | found 6
224 | ERROR | [x] Array closing indentation error, expected 2 spaces
| | but found 4
250 | ERROR | [x] 2 spaces found before inline comment; expected "//
| | Hash again all current hashed passwords." but
| | found "// Hash again all current hashed
| | passwords."
----------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...es/drupal-7/password_policy/includes/PasswordPolicyCondition.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...n-sites/drupal-7/password_policy/includes/PasswordPolicyItem.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ution-sites/drupal-7/password_policy/includes/PasswordPolicy.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
137 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
156 | ERROR | [x] Inline comments must end in full-stops,
| | exclamation marks, colons, question marks, or
| | closing parentheses
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/drupal-7/password_policy/includes/PasswordPolicyConstraint.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 2.33 secs; Memory: 17Mb
The patch is attached which fixes the coding standard issues.
Comments
Comment #2
aohrvetpv commentedvinod_kc, thanks a lot for the patch. Unfortunately I separately fixed almost all of these without seeing this issue. In the future if you set the status to 'Needs Review' it will be clearer there is a patch to review.
Comment #3
aohrvetpv commentedPatch that removes the last two coding standards errors reported by Coder 8.x-2.x.
Comment #5
aohrvetpv commented