Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\config_inspector.drush.inc
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\config_inspector.install
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\config_inspector.module
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\css\config_inspector.css
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\src\Commands\InspectorCommands.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   8 | WARNING | [x] Unused use statement
 144 | ERROR   | [ ] The array declaration extends to column 105 (the limit is 80). The array content should be split up over multiple lines
 194 | ERROR   | [ ] The array declaration extends to column 112 (the limit is 80). The array content should be split up over multiple lines
 208 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 220 | ERROR   | [x] Array indentation error, expected 14 spaces but found 15
 221 | ERROR   | [x] Array indentation error, expected 14 spaces but found 15
 223 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 260 | ERROR   | [x] Missing class doc comment
 262 | ERROR   | [x] Missing function doc comment
 269 | ERROR   | [x] Expected 1 blank line after function; 0 found
 270 | ERROR   | [x] The closing brace for the class must have an empty line before it
 270 | ERROR   | [ ] Closing class brace must be on a line by itself
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\src\ConfigInspectorManager.php
-----------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 3 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   7 | WARNING | [x] Unused use statement
   8 | WARNING | [x] Unused use statement
  12 | WARNING | [x] Unused use statement
 147 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
 149 | ERROR   | [ ] Parameter tags must be defined first in a doc comment
 281 | ERROR   | [x] There must be no blank lines after the function comment
 294 | ERROR   | [ ] Parameter $violations is not described in comment
 297 | ERROR   | [ ] Doc comment for parameter $list does not match actual variable name $violations
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\src\ConfigSchemaValidatability.php
---------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 13 LINES
---------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
  7 | ERROR   | [x] Missing class doc comment
  9 | ERROR   | [ ] Missing member variable doc comment
 10 | ERROR   | [ ] Missing member variable doc comment
 12 | ERROR   | [x] Missing function doc comment
 18 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 34 | ERROR   | [x] Missing function doc comment
 38 | ERROR   | [x] Missing function doc comment
 49 | ERROR   | [x] Missing function doc comment
 53 | ERROR   | [x] Missing function doc comment
 57 | ERROR   | [x] Missing function doc comment
 61 | ERROR   | [x] Missing function doc comment
 65 | ERROR   | [x] Missing function doc comment
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\src\Controller\ConfigInspectorController.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 202 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
 207 | ERROR   | [x] Array indentation error, expected 12 spaces but found 14
 265 | WARNING | [x] A comma should follow the last multiline array item. Found: 'config-inspector-tree'
 386 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\src\Form\ConfigInspectorItemForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\tests\src\Functional\ConfigInspectorUITest.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\tests\src\Functional\LoadTest.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
--------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------


FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_inspector\tests\src\Kernel\ConfigInspectorManagerTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

Time: 3.37 secs; Memory: 8MB

Steps to reproduce

phpcs --standard=“Drupal,DrupalPractice” --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .

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

sidharth_soman created an issue. See original summary.

sidharth_soman’s picture

Working on this.

sidharth_soman’s picture

Assigned: sidharth_soman » Unassigned
Status: Needs work » Needs review

I have raised an MR. The only errors remaining are those related to editing/filling out documentation comments.

avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
Issue tags: +Needs issue summary update

The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command and arguments have been used and which report that command shown.

shivam_tiwari’s picture

imustakim’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update

Issue summary updated.

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

shiv_yadav’s picture

Status: Needs work » Needs review
clarkssquared’s picture

Status: Needs review » Needs work

Hi,

I tried to applied the updated MR !3 but It seems that the MR didn't apply properly please refer to the snippet of the output in my terminal.

config_inspector git:(2.1.x) ✗ curl https://git.drupalcode.org/project/config_inspector/-/merge_requests/3.diff | git apply -v
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12148    0 12148    0     0  21960      0 --:--:-- --:--:-- --:--:-- 22208
Checking patch src/Commands/InspectorCommands.php...
error: while searching for:
use Consolidation\AnnotatedCommand\CommandResult;
use Consolidation\OutputFormatters\StructuredData\MetadataInterface;
use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
use Consolidation\OutputFormatters\StructuredData\UnstructuredListData;
use Drupal\config_inspector\ConfigInspectorManager;
use Drupal\config_inspector\ConfigSchemaValidatability;
use Drupal\Core\Config\StorageInterface;

error: patch failed: src/Commands/InspectorCommands.php:5
error: src/Commands/InspectorCommands.php: patch does not apply
Checking patch src/ConfigInspectorManager.php...
error: while searching for:

use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\Schema\Ignore;
use Drupal\Core\Config\Schema\Undefined;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Config\Schema\Element;
use Drupal\Core\Config\Schema\SchemaCheckTrait;
use Drupal\Core\TypedData\PrimitiveInterface;
use Drupal\Core\TypedData\TraversableTypedDataInterface;
use Drupal\Core\TypedData\Type\BooleanInterface;
use Drupal\Core\TypedData\Type\DateTimeInterface;

error: patch failed: src/ConfigInspectorManager.php:4
error: src/ConfigInspectorManager.php: patch does not apply
Checking patch src/ConfigSchemaValidatability.php...
error: while searching for:

namespace Drupal\config_inspector;

final class ConfigSchemaValidatability {

  private $constraints = [];
  private $results = [];

  public function __construct(string $property_path, array $constraints) {
    $this->constraints[$property_path] = $constraints;
    $this->results[$property_path] = !empty($constraints);
  }

  /**
   * Merges other validatability; not necessarily of the same root property path.
   *
   * @param self $other
   *   Another validatability.

error: patch failed: src/ConfigSchemaValidatability.php:4
error: src/ConfigSchemaValidatability.php: patch does not apply
Checking patch src/Controller/ConfigInspectorController.php...
Hunk #3 succeeded at 198 (offset -1 lines).
Hunk #4 succeeded at 261 (offset -1 lines).
Hunk #5 succeeded at 388 (offset 5 lines).
➜  config_inspector git:(2.1.x) ✗ 

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

sakthi_dev’s picture

Rebased and fixed the remaining issues. Please review.

shiv_yadav’s picture

Status: Needs work » Needs review
aayushmankotia’s picture

StatusFileSize
new139.41 KB

Hi,
Merge request !3 has resolved all the phpcs errors and everything seems fine to me . A screenshot is attached for reference.

alt
Moving to RTBC.
Thanks

aayushmankotia’s picture

Status: Needs review » Reviewed & tested by the community
wim leers’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for doing this!

But … 4 tests are failing 😅 So, not quite working fine just yet.

shiv_yadav’s picture

Status: Needs work » Needs review
wim leers’s picture

Assigned: Unassigned » wim leers
Related issues: +#3396042: Adopt GitLab CI

Just merged #3396042: Adopt GitLab CI, which will allow us to ensure to never regress against this again 😅

Thanks for the work here, everyone! Now reviewing…

wim leers’s picture

Status: Needs review » Needs work

I wanted to say "thanks", but it's hard to do so in this case, because this was done very poorly. It's literally breaking code, and it's removing parameters.

Therefore I'm not crediting:

  1. @sidharth_soman (for breaking code by literally deleting it 🤯, thus me having to re-check everything — not what I'd expect from somebody with even the most basic experience)
  2. @sakthi_dev (for not correctly realigning to 80 columns width and adding useless comments, thus me having to re-do all that)
  3. @shiv_yadav (for not correctly realigning to 80 columns width and adding useless comments, thus me having to re-do all that)
  4. @aayushmankotia (for RTBC'ing an issue at #14 that is literally no longer passing tests and uploading a useless screenshot of a patch applying)

To all of you: please read https://www.drupal.org/drupalorg/blog/ensuring-a-fair-drupal-contributio... 🙏 This was clear gaming behavior.

I am crediting:

  1. @apaderno for asking for clarifications in #5
  2. @clarkssquared for correctly pointing out bugs in the MR at #10
wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs work » Reviewed & tested by the community
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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