Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Here is a result from pareview.sh
- Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
- ESLint has found some issues with your code (please check the JavaScript coding standards).
checklistapi/checklistapi.js: line 1, col 1, Warning - Definition for rule 'no-mutable-exports' was not found (no-mutable-exports) checklistapi/checklistapi.js: line 2, col 3, Error - 'use strict' is unnecessary inside of modules. (strict) checklistapi/checklistapi.js: line 2, col 3, Error - Strings must use singlequote. (quotes) checklistapi/checklistapi.js: line 9, col 7, Error - Split 'var' declarations into multiple statements. (one-var) checklistapi/checklistapi.js: line 13, col 9, Error - Split 'var' declarations into multiple statements. (one-var) checklistapi/checklistapi.js: line 31, col 9, Error - Split 'var' declarations into multiple statements. (one-var) 6 problems
- DrupalPractice has found some issues with your code, but could be false positives.
FILE: ...ontrib/checklistapi/checklistapiexample/checklistapiexample.info.yml -------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------- 7 | WARNING | All dependencies must be prefixed with the project name, | | for example "drupal:" -------------------------------------------------------------------------- FILE: ...dules/contrib/checklistapi/tests/src/Unit/ChecklistapiModuleTest.php -------------------------------------------------------------------------- FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES -------------------------------------------------------------------------- 25 | WARNING | #description values usually have to run through t() for | | translation 32 | WARNING | #description values usually have to run through t() for | | translation 40 | WARNING | #description values usually have to run through t() for | | translation 99 | WARNING | @expectedException tags should not be used, use | | $§this->setExpectedException() or | | $this->expectException() instead 100 | WARNING | @expectedExceptionMessage tags should not be used, use | | $§this->setExpectedException() or | | $this->expectException() instead -------------------------------------------------------------------------- FILE: ...dules/contrib/checklistapi/src/Controller/ChecklistapiController.php -------------------------------------------------------------------------- FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES -------------------------------------------------------------------------- 22 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 24 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 28 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 32 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 35 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 45 | WARNING | \Drupal calls should be avoided in classes, use | | dependency injection instead 48 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 61 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead 81 | WARNING | t() calls should be avoided in classes, use dependency | | injection and $this->t() instead -------------------------------------------------------------------------- Time: 723ms; Memory: 8.25Mb
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
FILE: ...es/drupal8_clear/modules/contrib/checklistapi/checklistapi.drush.inc
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
8 | ERROR | [x] When importing a class with "use", do not include a
| | leading \
9 | ERROR | [x] When importing a class with "use", do not include a
| | leading \
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...sites/drupal8_clear/modules/contrib/checklistapi/checklistapi.module
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
51 | ERROR | [x] Data types in @return tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...ites/drupal8_clear/modules/contrib/checklistapi/checklistapi.install
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
8 | ERROR | [x] When importing a class with "use", do not include a
| | leading \
9 | ERROR | [x] When importing a class with "use", do not include a
| | leading \
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: .../modules/contrib/checklistapi/src/Form/ChecklistapiChecklistForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...les/contrib/checklistapi/src/Form/ChecklistapiChecklistClearForm.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
82 | ERROR | [x] Expected 1 blank line after function; 0 found
83 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: ...al8_clear/modules/contrib/checklistapi/src/ChecklistapiChecklist.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
206 | ERROR | [x] Data types in @return tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
Time: 1.23 secs; Memory: 11.5Mb
The /tests/src/Unit/ChecklistapiModuleTest.php should be ignored, because the Unit tests should be without any translations.
Comment | File | Size | Author |
---|---|---|---|
#2 | checklistapi-coding_standards-2942220-2.patch | 7.57 KB | tibezh |
Comments
Comment #2
tibezh CreditAttribution: tibezh at OPTASY, Drupal Ukraine Community commentedPatch attached
Comment #4
TravisCarden CreditAttribution: TravisCarden as a volunteer commentedThanks, @tibezh!