Problem/Motivation

Child issue from https://www.drupal.org/project/gutenberg/issues/3255691
The idea here is to fix all phpcs errors/warnings from the files found directly on the root directory.

Steps to reproduce

Open the Gutenberg module directory on your terminal and run the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml . -l > phpcs_gutenber__root.txt. You should end up with a file like the one attached bellow.

Proposed resolution

Fix the errors either automatically or manually and create a patch.

Comments

andregp created an issue. See original summary.

andregp’s picture

I'm working on this. :)

andregp’s picture

StatusFileSize
new21.16 KB

Sorry, I posted on the wrong issue. Please, ignore the patch above.

andregp’s picture

Assigned: andregp » Unassigned
Status: Active » Needs review
StatusFileSize
new4.79 KB
new2.52 KB

This patch should solve all phpcs errors. The only warnings left after applying this patch are regarding to README.md and CHANGELOG.md files which I believe should not be changed.

Matheus Macario’s picture

Assigned: Unassigned » Matheus Macario
Matheus Macario’s picture

Assigned: Matheus Macario » Unassigned
Status: Needs review » Reviewed & tested by the community

review done on Gutenberg's root files :
- Installed module
- Code review on changes made on the #4 patch (3255701-4)
- no errors popped out, except those warnings that you already mentioned on README.md and CHANGELOG.md, which i also think that shouldn't be modified.

  • marcofernandes committed 6fcd315 on 8.x-2.x
    Issue #3255701 by andregp, Matheus Macario, marcofernandes: PHPCS errors...
marcofernandes’s picture

Status: Reviewed & tested by the community » Fixed

Regarding the named constants, we need to keep it as it is for now because they are set by the build script.

Status: Fixed » Closed (fixed)

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