Right now in module there are 100 errors and 25 warnings in 31 files.
In order to simplify review process this issue splited to several issues to fix specific phpcs rules.
Child issue with list of rules to fix:
#3411792: Fix phpcs Drupal.WhiteSpace, Squiz.WhiteSpace issues
- Drupal.WhiteSpace.ScopeIndent
- Drupal.WhiteSpace.OpenBracketSpacing
- Drupal.WhiteSpace.CloseBracketSpacing
- Squiz.WhiteSpace.FunctionSpacing
- Squiz.WhiteSpace.SuperfluousWhitespace
#3411794: Fix phpcs Drupal.Arrays.Array issues
- Drupal.Arrays.Array
- Drupal.Classes.UnusedUseStatement
- DrupalPractice.FunctionCalls.InsecureUnserialize
- SlevomatCodingStandard.PHP.ShortList
- Drupal.Semantics.FunctionT
#3411807: Fix phpcs Drupal.Files.LineLength issues
- Drupal.Files.LineLength
#3411808: Fix phpcs Drupal.Commenting issues
- Drupal.Commenting.DocComment
- Drupal.Commenting.FunctionComment
- Drupal.Commenting.InlineVariableComment
- Drupal.Commenting.ClassComment
- Drupal.Commenting.DataTypeNamespace
- Drupal.Commenting.Deprecated
- Drupal.Commenting.FileComment
- Drupal.Commenting.InlineComment
Command to get phpcs report:
phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme modules/custom/pathauto/
PHPCS report:
Comment | File | Size | Author |
---|---|---|---|
#41 | report.txt | 32.59 KB | Nikolay Shapovalov |
Issue fork pathauto-2833680
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:
- 2833680-coding-standard-fixes changes, plain diff MR !26
- 2833680-coding-standards-for compare
Comments
Comment #2
renatogPatch submitted with the fixes.
Thanks.
Regards.
Comment #3
cebasqueira CreditAttribution: cebasqueira at CI&T commentedSmall change on patch!
Comment #4
renatogThank you very much @cebasqueira.
Fixed variable unused.
Regards.
Comment #5
cebasqueira CreditAttribution: cebasqueira at CI&T commentedThanks @renatog, works fine... RTBC
Comment #6
BerdirThanks, but this adds a lot of strange comments just to technically comply to the standards, can't accept that, see below.
this isn't very useful, an actual description would be nice.
that isn't really proper english anymore, we oculd leave out automatically instead, as generating kind of implies automatically.
those descriptions are pretty bogus, if we do write something, we need to have an actual description that makes sense.
this is not valid.
this neither.
same.
this change is also not correct, force is a lower-case key.
same for those things, it only makes sense to have a description if it's at least valid english
this doesn't make sesne.
this change doesn't make sense, this is commented out code.
this and more below are also bad, if we have a docblock it needs to be an actual sentence.
Comment #7
hgunicamp CreditAttribution: hgunicamp at CI&T commentedContinuing the work of the patch 'pathauto-codingstandards-2833680-4.patch'.
Comment #8
hgunicamp CreditAttribution: hgunicamp at CI&T commentedComment #10
hgunicamp CreditAttribution: hgunicamp at CI&T commentedSorry. A typo when saving the file.
Comment #12
aldairsoares CreditAttribution: aldairsoares at CI&T commentedI'm working on it.
Comment #13
aldairsoares CreditAttribution: aldairsoares at CI&T commentedI worked on Coding Standards against 8.x-1.x-dev.
I ran all the tests and everything seemed to work.
Needs review :D
Comment #15
aldairsoares CreditAttribution: aldairsoares at CI&T commentedThe error occured in the patch is from Javascript Functional test (PathautoLocaleTest::testLanguagePatterns).
The code on 8.x-1.x contained a return statement in line #161 which prevented to run the rest of the assertions. The error occurs in line #182.
I was not able to fix that therefore I am leaving this one for someone with better understanding of the module.
Comment #16
aldairsoares CreditAttribution: aldairsoares at CI&T commentedComment #17
matheusmaciel CreditAttribution: matheusmaciel at CI&T commentedComment #19
urvashi_vora CreditAttribution: urvashi_vora at Valuebound for Valuebound commentedI am working on this.
Comment #21
urvashi_vora CreditAttribution: urvashi_vora at Valuebound for Valuebound commentedComment #22
vitorbs CreditAttribution: vitorbs at CI&T commentedHi, i founded some code standards errors, i will work on that.
Comment #23
vitorbs CreditAttribution: vitorbs at CI&T commentedComment #24
vitorbs CreditAttribution: vitorbs at CI&T commentedphpcs fixed
Comment #25
vitorbs CreditAttribution: vitorbs at CI&T commentedComment #26
alexanderj CreditAttribution: alexanderj commentedi will review it
Comment #27
alexanderj CreditAttribution: alexanderj commentedI did the review on the related code standards errors and they were fixed, but the 2 tests are still failing, so I believe it is still necessary to resolve them.
Comment #28
dmariano CreditAttribution: dmariano commentedI will on that!
Comment #29
dmariano CreditAttribution: dmariano commentedMerge conflicts resolved, but the test are failing.
Comment #30
dmariano CreditAttribution: dmariano commentedComment #31
jsricardo CreditAttribution: jsricardo at CI&T commentedI Will work on it
Comment #32
jsricardo CreditAttribution: jsricardo at CI&T commentedSorry, I couldn't identify the error.
as said in comment #28, tests keep failing
Comment #33
zkhan.aamir CreditAttribution: zkhan.aamir at Specbee for Drupal India Association commentedComment #35
Nikolay ShapovalovAs requested by @Berdir I am going to split this MR to small one, and create separate issues.
I create child issue: #3411792: Fix phpcs Drupal.WhiteSpace, Squiz.WhiteSpace issues.
Comment #36
Nikolay ShapovalovFixed issue in the MR made during MR merge conflict fix.
And create second child issue #3411794: Fix phpcs Drupal.Arrays.Array issues
Comment #37
Nikolay ShapovalovNow there are 5 issues, this should fix all phpcs errors:
#3411792: Fix phpcs Drupal.WhiteSpace, Squiz.WhiteSpace issues
#3411794: Fix phpcs Drupal.Arrays.Array issues
#3411804: Fix phpcs Drupal.Classes, DrupalPractice.FunctionCalls, SlevomatCodingStandard.PHP, Drupal.Semantics
#3411807: Fix phpcs Drupal.Files.LineLength issues
#3411808: Fix phpcs Drupal.Commenting issues
Comment #38
Nikolay ShapovalovConvert this issue to Meta.
Update IS.
Comment #41
Nikolay ShapovalovAdd fresh phpcs report to IS.