Created on 2 December 2016, almost 8 years ago
Updated 16 July 2024, 4 months ago

Found some code standard issues.

๐Ÿ› Bug report
Status

Needs work

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ทIran jaiiali

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi @Snehal Brahmbhatt,

    After applying your Patch #3 to the Alternative Character module on Drupal 10, not all of the PHPCS errors were resolved.
    See below:

    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/drupalion-1841838/alternative_character.info
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     1 | ERROR | "name" property is missing in the info file
     1 | ERROR | "description" property is missing in the info file
     1 | ERROR | "core" property is missing in the info file
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/drupalion-1841838/alternative_character.module
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 116 ERRORS AND 2 WARNINGS AFFECTING 45 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
      1 | ERROR   | [ ] File contains UTF-8 byte order mark, which may corrupt your application
      1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
      5 | ERROR   | [x] Doc comment short description must start with a capital letter
      7 | WARNING | [ ] @author tags are not usually used in Drupal, because over time multiple contributors will touch the code anyway
      9 | ERROR   | [x] There must be exactly one blank line after the file comment
     10 | ERROR   | [x] Missing function doc comment
     11 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     11 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     14 | ERROR   | [x] Missing function doc comment
     15 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     15 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     15 | ERROR   | [x] Space found before square bracket; expected "where[" but found "where ["
     15 | ERROR   | [x] Space found before square bracket; expected "][" but found "] ["
     16 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     16 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     17 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     17 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     18 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     18 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     18 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     18 | ERROR   | [x] There should be no white space after an opening "("
     18 | ERROR   | [x] There should be no white space before a closing ")"
     19 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     19 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     19 | ERROR   | [x] Space found before square bracket; expected "where[" but found "where ["
     19 | ERROR   | [x] Space found before square bracket; expected "][" but found "] ["
     22 | ERROR   | [x] Missing function doc comment
     23 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     23 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     24 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     24 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     24 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     25 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     25 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     26 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     26 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     27 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     27 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     27 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     27 | ERROR   | [x] There should be no white space after an opening "("
     27 | ERROR   | [x] There should be no white space before a closing ")"
     30 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found "convert_to_persian_char" but expected
        |         |     "alternative_character_convert_to_persian_char"
     30 | ERROR   | [x] Missing function doc comment
     31 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     31 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     31 | ERROR   | [x] A unary operator statement must not be followed by a space
     31 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     31 | ERROR   | [x] There should be no white space after an opening "("
     31 | ERROR   | [x] There should be no white space before a closing ")"
     32 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     32 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     32 | ERROR   | [x] There should be no white space after an opening "("
     32 | WARNING | [ ] Unused variable $key1.
     32 | ERROR   | [x] There should be no white space before a closing ")"
     33 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     33 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     33 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     33 | ERROR   | [x] There should be no white space after an opening "("
     33 | ERROR   | [x] There should be no white space before a closing ")"
     34 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     34 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     35 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     35 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     35 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     35 | ERROR   | [x] There should be no white space after an opening "("
     35 | ERROR   | [x] There should be no white space before a closing ")"
     36 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     36 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     36 | ERROR   | [x] Whitespace found at end of line
     37 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     37 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     37 | ERROR   | [x] Use "elseif" in place of "else if"
     38 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     38 | ERROR   | [x] Line indented incorrectly; expected 8 spaces, found 4
     38 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     38 | ERROR   | [x] There should be no white space after an opening "("
     38 | ERROR   | [x] There should be no white space before a closing ")"
     39 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     39 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 3
     40 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     40 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
     41 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     41 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     42 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     42 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     44 | ERROR   | [x] Closing brace indented incorrectly; expected 1 spaces, found 2
     47 | ERROR   | [ ] All functions defined in a module file must be prefixed with the module's name, found "replace_char" but expected
        |         |     "alternative_character_replace_char"
     47 | ERROR   | [x] Missing function doc comment
     48 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     48 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     48 | ERROR   | [x] No space found before comment text; expected "// dvm(($string));" but found "//dvm(($string));"
     48 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     49 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     49 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     49 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
     49 | ERROR   | [x] There should be no white space before a closing ")"
     50 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     50 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     50 | ERROR   | [x] There must be no space between the "array" keyword and the opening parenthesis
     50 | ERROR   | [x] There should be no white space before a closing ")"
     51 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     51 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     52 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     52 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     52 | ERROR   | [x] Space before opening parenthesis of function call prohibited
     52 | ERROR   | [x] There should be no white space after an opening "("
     52 | ERROR   | [x] There should be no white space before a closing ")"
     53 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     53 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     53 | ERROR   | [x] No space found before comment text; expected "// dvm($result);" but found "//dvm($result);"
     54 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     54 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
     55 | ERROR   | [x] Expected 1 newline at end of file; 9 found
     57 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
     57 | ERROR   | [x] Whitespace found at end of line
     61 | ERROR   | [ ] More than 2 empty lines are not allowed
     62 | ERROR   | [ ] More than 2 empty lines are not allowed
     63 | ERROR   | [ ] More than 2 empty lines are not allowed
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 110 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 76ms; Memory: 10MB

    I ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml drupalion-1841838/

    I'm moving this to โ€˜Needs workโ€™ for now.

    Thank you!

Production build 0.71.5 2024