Fix GitLab CI failures

Created on 23 December 2024, 2 days ago

Problem/Motivation

In recent GitLab CI builds pipelines...

I see three new failures...

  1. Cspell:
    $ $CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/cspell -c .cspell.json --show-suggestions --show-context --no-progress $_CSPELL_EXTRA $CSPELL_SEARCH || EXIT_CODE=$?
    README.md:62:10     - Unknown word (mymodule)   -- function mymodule_form($form, &$form_state
    	 Suggestions: [module, Module, hmodule, hModule, modula]
    README.md:82:10     - Unknown word (mymodule)   -- function mymodule_form_user_login_alter
    	 Suggestions: [module, Module, hmodule, hModule, modula]
    CSpell: Files checked: 68, Issues found: 2 in 1 file.
    
  2. Stylelint:
    $ $CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/stylelint --ignore-path ./.stylelintignore --config $CI_PROJECT_DIR/$_WEB_ROOT/core/.stylelintrc.json ./**/*.css --formatter verbose --color $_STYLELINT_EXTRA || true
    css/seven.label-help.css
    9:15 āœ– Insert "0" prettier/prettier
    āœ– 1 problem (1 error, 0 warnings)
  3. Phpcs:
    $ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
    FILE: ...b/modules/custom/label_help/modules/label_help_test/label_help_test.module
    --------------------------------------------------------------------------------
    FOUND 5 ERRORS AND 1 WARNING AFFECTING 5 LINES
    --------------------------------------------------------------------------------
      6 | ERROR   | [x] There must be exactly one blank line after the file comment
        |         |     (Drupal.Commenting.FileComment.SpacingAfterComment)
      9 | ERROR   | [x] Missing function doc comment
        |         |     (Drupal.Commenting.FunctionComment.Missing)
      9 | ERROR   | [x] Expected 1 blank line before function; 2 found
        |         |     (Squiz.WhiteSpace.FunctionSpacing.Before)
     15 | ERROR   | [x] Missing function doc comment
        |         |     (Drupal.Commenting.FunctionComment.Missing)
     30 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks,
        |         |     question marks, colons, or closing parentheses
        |         |     (Drupal.Commenting.InlineComment.InvalidEndChar)
     33 | WARNING | [x] A comma should follow the last multiline array item. Found:
        |         |     'node_test_label_help_core_fields_edit_form'
        |         |     (Drupal.Arrays.Array.CommaLastItem)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: .../modules/custom/label_help/modules/label_help_test/label_help_test.install
    --------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      1 | ERROR | [x] Missing file doc comment
        |       |     (Drupal.Commenting.FileComment.Missing)
     11 | ERROR | [x] Expected 1 newline at end of file; 2 found
        |       |     (Drupal.Files.EndFileNewline.TooMany)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: ...t/label_help/web/modules/custom/label_help/.ddev/xhprof/xhprof_prepend.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
     22 | WARNING | Line exceeds 80 characters; contains 85 characters
        |         | (Drupal.Files.LineLength.TooLong)
     41 | WARNING | Line exceeds 80 characters; contains 92 characters
        |         | (Drupal.Files.LineLength.TooLong)
     48 | ERROR   | Doc comment short description must be on a single line, further
        |         | text should be a separate paragraph
        |         | (Drupal.Commenting.DocComment.ShortSingleLine)
    --------------------------------------------------------------------------------
    Time: 163ms; Memory: 8MB
    PHP CODE SNIFFER REPORT SUMMARY
    --------------------------------------------------------------------------------
    FILE                                                            ERRORS  WARNINGS
    --------------------------------------------------------------------------------
    ...b/modules/custom/label_help/.ddev/xhprof/xhprof_prepend.php  1       2
    .../label_help/modules/label_help_test/label_help_test.install  2       0
    ...m/label_help/modules/label_help_test/label_help_test.module  5       1
    --------------------------------------------------------------------------------
    A TOTAL OF 8 ERRORS AND 3 WARNINGS WERE FOUND IN 4 FILES
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX 8 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

šŸ‡ŖšŸ‡ØEcuador jwilson3

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024