@todo should start with capitalized letter or non-alpha symbol

Created on 11 October 2022, over 1 year ago
Updated 29 April 2024, 2 months ago

Problem/Motivation

There was discussion around improving the linting when we tried to enforce a previous attempt at @todo linting on core.

https://git.drupalcode.org/project/drupal/-/merge_requests/504#note_18998

Steps to reproduce

Proposed resolution

Enforce additional rules around the formatting of @todo statements.

Remaining tasks

Decide on the exact rules we want to enforce around @todo statement formatting.

@todo \Drupal\foo\Bar should be valid.
@todo $foo variable name is valid.
@todo this should be flagged as a warning with a suggestion.

Consider if existing comment style sniffs cover this or should cover this vs adding logic to the @todo specific sniff.

Yes, in response to @klausi's points above, I think the logic could be reverted to allow any non-space except "-" or ":" as we had before. Then we give a separate warning if the first letter is a lower-case alpha and provide the fix to convert to upper case.

β€” https://github.com/pfrenssen/coder/pull/174#issuecomment-1252249092

Work off of this existing draft PR: https://github.com/pfrenssen/coder/pull/174

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

πŸ‡ΊπŸ‡ΈUnited States adamzimmermann

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024