Skip to content

Fix Drupal coding standards violations in custom module and theme#166

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/check-drupal-coding-standards
Draft

Fix Drupal coding standards violations in custom module and theme#166
Copilot wants to merge 1 commit intomainfrom
copilot/check-drupal-coding-standards

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 1, 2026

Custom PHP files and theme CSS lacked @file doc comments, proper use statements, and minor formatting issues. No phpcs.xml.dist existed, leaving CSS full of false positives from modern CSS syntax (custom properties, multi-line values, :where()).

PHP (markie.module, markie.install, markconroy.theme)

  • Added @file doc comments with descriptions
  • Replaced fully-qualified \Symfony\...\AccessDeniedHttpException with a use import
  • Removed leading \ from use \Drupal\node\Entity\Node
  • Fixed doc comment asterisk alignment; added trailing period to inline comment
  • Removed dead commented-out code; split an 85-char line to stay within 80-char limit

CSS (breadcrumbs.css, pager.css, base.css, homepage.css, README.md)

  • Added missing trailing newlines
  • Removed blank line before closing } in .homepage__nav ul

phpcs.xml.dist (new)

Adds a project-level PHPCS config so vendor/bin/phpcs works without flags:

  • Applies Drupal + DrupalPractice standards to web/modules/custom/ and web/themes/custom/
  • Excludes CSS sniffs that produce false positives on modern CSS (Squiz.CSS.MissingColon, Squiz.CSS.SemicolonSpacing, Squiz.CSS.Indentation, Drupal.CSS.ClassDefinitionNameSpacing.MultipleSelectors)
  • Suppresses the version key warning for non-distributed custom theme/module info files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants