Issues found in node_cleanup
1. .cspell.json missing - Required for drupal.org CI. Needs a flagWords block (blacklist/whitelist/grey/queuing/e-mail variants) and a words array for any module-specific terms like cleanup, nid, unpublished.
2. .gitignore missing - Standard file expected for all contrib modules.
3. composer.json missing authors and support sections - The file has name, description, type, license, and require but no authors array or support object with issues and source URLs.
4. core_version_requirement: ^10.3 || ^11.1 is unnecessarily restrictive - Both info.yml and composer.json use ^11.1 instead of ^11. Unless the module uses an API only available in 11.1, it should be ^10.3 || ^11 to include Drupal 11.0.
5. node_cleanup.module missing @file docblock - Drupal PHPCS requires a @file docblock as the first thing after <?php, before declare(strict_types=1).
6. Cron hook is procedural, not OOP - node_cleanup_cron() in .module uses \Drupal::service() (static call). For a module targeting Drupal 10.3+, hooks should be in src/Hook/NodeCleanupHooks.php with #[Hook('cron')] and services injected via constructor. The .module file should contain only a #[LegacyHook] shim.
7. NodeCleanupController uses ControllerBase magic helpers instead of explicit injection - $this->formBuilder() comes from ControllerBase rather than being injected via create()/constructor. Should declare and inject FormBuilderInterface explicitly for testability.
Comments
Comment #3
zeeshan_khan commented