GitLab Ci reports PHP_CodeSniffer errors/warnings which should be fixed; there are still errors/warnings to fix.

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

sahil.goyal created an issue. See original summary.

sahil.goyal’s picture

StatusFileSize
new1.43 KB

Fixing the phpcs warnings, attaching the patch, please review.

sahil.goyal’s picture

Status: Needs work » Needs review

Charchil Khandelwal made their first commit to this issue’s fork.

charchil khandelwal’s picture

Assigned: Unassigned » charchil khandelwal

I will review this.

charchil khandelwal’s picture

Assigned: charchil khandelwal » Unassigned

Patch #2 tested and applied successfully, all the errors and warnings are fixed.
Created MR !4 for easy preview and commenting.
RTBC +1.

Thanks.

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -
StatusFileSize
new177.28 KB
new68.86 KB

Hi Charchil Khandelwal

I reviewed MR!4, and verified it fixes all the issue reported by phpcs. Drupal core version 9.5.8, Bootstrap Paragraphs 8.x-2.x-dev.

I added screenshots for reference.
Thank You.

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Category: Bug report » Task
Priority: Normal » Minor
Issue tags: +Coding standards
avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
-  - paragraphs
-  - bootstrap_paragraphs
+  - drupal:paragraphs
+  - drupal:bootstrap_paragraphs

Those are not Drupal core modules.

ashutosh ahirwal’s picture

Status: Needs work » Needs review
StatusFileSize
new1.47 KB

Providing patch with solution.
please review.

avpaderno’s picture

Status: Needs review » Needs work
-  - paragraphs
-  - bootstrap_paragraphs
+  - paragraphs: paragraphs
+  - bootstrap_paragraphs: bootstrap_paragraphs

The space after the colon must be removed.

avpaderno’s picture

-  - paragraphs
-  - bootstrap_paragraphs
+  - drupal:paragraphs
+  - drupal:bootstrap_paragraphs

Those are not Drupal core modules.

paraderojether’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work
-  - paragraphs
-  - bootstrap_paragraphs
+  - drupal:paragraphs
+  - drupal:bootstrap_paragraphs

If those are not Drupal core modules, drupal: cannot be used to refer to those modules. The dependencies format is [project name]:[module name], where [project name] is replaced by the machine name of the project that contains the module, and [module name] is the module machine name.

Devon_4224’s picture

Working on this for Drupalcon 2023 Pittsburgh

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Status: Needs work » Needs review
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
nikolay shapovalov’s picture

Status: Needs review » Needs work

Please check MR.
Hide patch files, let's continue with MR workflow.

avpaderno’s picture

Status: Needs work » Needs review
a.aaronjake’s picture

Status: Needs review » Needs work

Hi @everyone,

Applied and reviewed MR!4, on my terminal, errors were still reported. Please see below:

bootstrap_paragraphs git:(8.x-2.x) curl https://git.drupalcode.org/project/bootstrap_paragraphs/-/merge_requests/4.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2446    0  2446    0     0   6360      0 --:--:-- --:--:-- --:--:--  6575
patching file README.md
patching file modules/bp_callout/bp_callout.info.yml
patching file modules/bp_quicklinks/README.md
patching file modules/bp_statistics/bp_statistics.info.yml
➜  bootstrap_paragraphs git:(8.x-2.x) ✗ ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig bootstrap_paragraphs

FILE: ...drupal-orgissue-v9/web/modules/contrib/bootstrap_paragraphs/CONTRIBUTOR.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 166 | WARNING | Line exceeds 80 characters; contains 81 characters
--------------------------------------------------------------------------------


FILE: ...phs/config/optional/field.storage.paragraph.bp_link_open_in_new_window.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 17 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...e-v9/web/modules/contrib/bootstrap_paragraphs/bootstrap_paragraphs.install
--------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
  10 | ERROR | [x] Use statements should be sorted alphabetically. The first
     |       |     wrong one is Drupal\Component\Utility\NestedArray.
 392 | ERROR | [x] Expected 1 blank line after function; 3 found
 395 | ERROR | [ ] More than 2 empty lines are not allowed
 421 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 421 | ERROR | [x] Line indented incorrectly; expected at least 2 spaces, found
     |       |     1
 421 | ERROR | [x] Array indentation error, expected 4 spaces but found 1
 441 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 441 | ERROR | [x] Line indented incorrectly; expected at least 2 spaces, found
     |       |     1
 441 | ERROR | [x] Array indentation error, expected 4 spaces but found 1
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 617ms; Memory: 14MB

Kindly check

Thanks,
Jake

avpaderno’s picture

Issue summary: View changes

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

thejimbirch’s picture

Status: Needs work » Fixed

Merged to dev, thanks all.

Status: Fixed » Closed (fixed)

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