Problem/Motivation

FILE: block_component_library\block_component_library.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: block_component_library\block_component_library.install
-----------------------------------------------------------------------------------------------------------------------------
FOUND 42 ERRORS AND 4 WARNINGS AFFECTING 30 LINES
-----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
4 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\field\Entity\FieldConfig.
16 | ERROR | [x] Expected 1 space after IF keyword; 0 found
16 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
21 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
21 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 4
25 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
29 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
29 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
30 | ERROR | [x] Expected 1 space after IF keyword; 0 found
30 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
36 | ERROR | [x] Expected 1 space after IF keyword; 0 found
36 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
39 | ERROR | [x] Expected 1 space after IF keyword; 0 found
39 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
48 | ERROR | [x] Expected 1 space before opening brace; found 0
50 | ERROR | [x] Expected 1 space after IF keyword; 0 found
50 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
54 | ERROR | [x] Expected 1 space after IF keyword; 0 found
54 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
62 | ERROR | [x] Parameter comment must be on the next line
62 | ERROR | [x] Parameter comment must end with a full stop
63 | ERROR | [x] Parameter comment must be on the next line
64 | ERROR | [x] Parameter comment must be on the next line
65 | ERROR | [x] Separate the @param and @return sections by a blank line.
65 | ERROR | [x] Expected "bool" but found "boolean" for function return type
65 | ERROR | [ ] Description for the @return value is missing
67 | ERROR | [x] Expected 1 space before opening brace; found 0
69 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
92 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
92 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but found 6
96 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
102 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
106 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
107 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
109 | ERROR | [x] Expected "bool" but found "boolean" for function return type
109 | ERROR | [ ] Description for the @return value is missing
111 | ERROR | [x] Expected 1 space before opening brace; found 0
118 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
124 | ERROR | [ ] Function return type is void, but function contains return statement
124 | ERROR | [ ] Description for the @return value is missing
126 | ERROR | [x] Expected 1 space before opening brace; found 0
129 | ERROR | [x] Expected 1 space after IF keyword; 0 found
129 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
132 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sunil jolapara created an issue. See original summary.

sunil jolapara’s picture

Status: Needs work » Needs review

anybody made their first commit to this issue’s fork.

anybody’s picture

Title: Fix the issues reported by PHP_CodeSniffer » Fix the issues reported by PHP_CodeSniffer, phpcs, cspell
Version: 1.3.2 » 1.x-dev

Thanks @sunil jolapara could you also fix phpcs and cspell here?

anybody’s picture

Assigned: » Unassigned
Status: Needs review » Needs work
cleavinjosh’s picture

Assigned: Unassigned » cleavinjosh
cleavinjosh’s picture

cleavinjosh’s picture

cleavinjosh’s picture

Assigned: cleavinjosh » Unassigned
Status: Needs work » Needs review

Hi,

I am not sure if it is safe to change the "Aktion" and the "preconfiguration" being flagged so I just added them to a dictionary.

Please review, check, and advise on MR!4. Thank you.

anybody’s picture

Status: Needs review » Needs work

block_component_library.install is unacceptable this way, please look yourself.

cleavinjosh’s picture

Assigned: Unassigned » cleavinjosh
cleavinjosh’s picture

Assigned: cleavinjosh » Unassigned
Status: Needs work » Needs review

Hi @anybody,

Thank you for your feedback, especially on the cspell issue. It is greatly appreciated!

Please review, check, and advise. Thank you.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

The display of the changes in the .install file is a bit weird but seems all fine. Thanks!

anybody’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.