Problem/Motivation

Pipelines are failing due to phpcs and cspell errors:

--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 58 | ERROR | Parameter $ohdear_sdk is not described in comment
    |       | (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
--------------------------------------------------------------------------------
FILE: ...stom/ohdear_integration-3312531/src/Commands/OhDearIntegrationCommands.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
   9 | ERROR | [x] Use statements should be sorted alphabetically. The first
     |       |     wrong one is
     |       |     Drupal\Core\StringTranslation\StringTranslationTrait.
     |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  88 | ERROR | [x] The first parameter of a multi-line function declaration
     |       |     must be on the line after the opening bracket
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
  94 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
  94 | ERROR | [x] The closing parenthesis of a multi-line function declaration
     |       |     must be on a new line
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
 192 | ERROR | [x] The first parameter of a multi-line function declaration
     |       |     must be on the line after the opening bracket
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
 194 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
 194 | ERROR | [x] The closing parenthesis of a multi-line function declaration
     |       |     must be on a new line
     |       |     (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 170ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...egration-3312531/src/Commands/OhDearIntegrationCommands.php  7       0
...tion-3312531/src/Controller/OhDearIntegrationController.php  1       0
--------------------------------------------------------------------------------
A TOTAL OF 8 ERRORS AND 0 WARNINGS WERE FOUND IN 7 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 7 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
--------------------------------------------------------------------------------
    SOURCE                                                                 COUNT
--------------------------------------------------------------------------------
[x] Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine         2
[x] Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing        2
[x] Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma     2
[ ] Drupal.Commenting.FunctionComment.ParamMissingDefinition               1
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.Incorrectl  1
--------------------------------------------------------------------------------
A TOTAL OF 8 SNIFF VIOLATIONS WERE FOUND IN 5 SOURCES
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SOURCES AUTOMATICALLY (7 VIOLATIONS IN TOTAL)
--------------------------------------------------------------------------------
=== This is _cspell_unrecognized_words.txt ===
Baaa
configuraton
ETABM
healtchecks
Healthcheck
healthcheck
Healthchecks
healthchecks
maintence
overridde
zcke

Proposed resolution

Fix phpcs errors and a list of skip words.

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

useernamee created an issue. See original summary.

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

ankitv18’s picture

Status: Active » Needs review

Cspell and phpcs pipelines are fixed now ~~ please review MR!26

chandansha’s picture

Status: Needs review » Needs work

i have tested MR 26 and run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig . this command i found some phpcs issue.
also, pipeline failed test stage.

FILE: /home/chandansha/docker/testd10/web/modules/custom/ohdear_integration-3469661/README.md
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------
  96 | WARNING | Line exceeds 80 characters; contains 88 characters
 100 | WARNING | Line exceeds 80 characters; contains 84 characters
---------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/custom/ohdear_integration-3469661/ohdear_integration.services.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 22 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/custom/ohdear_integration-3469661/ohdear_integration.routing.yml
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
 7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
------------------------------------------------------------------------------------------------------------------

Time: 276ms; Memory: 12MB
ankitv18’s picture

@chandansha have you even the checked the gitlab pipelines? https://git.drupalcode.org/issue/ohdear_integration-3469661/-/jobs/2519411

Both cspell and phpcs are fixed now.

ankitv18’s picture

Status: Needs work » Needs review
chandansha’s picture

@ankitv18 i have checked pipeline it is fixed but in my local i found above issue.

ankitv18’s picture

So there might be some configuration mismatch for sniffing out the code spell at your local. Please do check as of now Drupal follows gitlab template to execute the pipelines for validation and all the phpstan issues.

useernamee’s picture

Looks good, merged.

  • useernamee committed dac0ab13 on 2.x authored by ankitv18
    Issue #3469661 by ankitv18, useernamee: Fix code style and spelling...
useernamee’s picture

Status: Needs review » Fixed
useernamee’s picture

I guess we now need a test fix for 2.x, and we're good.

Status: Fixed » Closed (fixed)

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