GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Google style: Word TODO of Todo comment must be in all caps · Issue #17501 · checkstyle/checkstyle

Google style: Word TODO of Todo comment must be in all caps #17501

New issue
Copy link
New issue
Copy link
Closed
#17599
Closed
Google style: Word TODO of Todo comment must be in all caps#17501
#17599
Copy link
Labels
approvedbuggoogle style
Milestone
11.0.1

Description

@mohitsatr
mohitsatr
opened on Jul 29, 2025
Issue body actions

I have read check documentation: https://checkstyle.org/checks/misc/todocomment.html
I have downloaded the latest cli from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words

https://google.github.io/styleguide/javaguide.html#s4.8.6.2-todo-comments

A TODO comment begins with the word TODO in all caps, a following colon

Config:

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
    "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
    "https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
  <module name="TreeWalker">
    <module name="TodoComment"/>
  </module>
</module>

Code:

/** some javadoc. */
public class Test {
  void myFunc(int i) {
    // todo: implementing  // EXPECTED VIOLATION
  }

  void myFunc1(int i) {
    // Todo: implementing  // EXPECTED VIOLATION
  }
  
  void myFunc2(int i) {
    // toDo: implementing  // EXPECTED VIOLATION
  }

  void myFunc3(int i) {
    // TODO: implementing  // ok 
  }
}

CLI:

$ java -jar checkstyle-10.26.1-all.jar -c try_config.xml Test.java 
Starting audit...
[ERROR] /mnt/5D92528E6B945467/test/testing/Test.java:16:7: Comment matches to-do format 'TODO:'. [TodoComment]
Audit done.
Checkstyle ends with 1 errors.

As a part of the fix, we need to add TodoCheck to the google config and validate TODO is all in caps.

Activity

  1. romani commented on Jul 29, 2025

    @romani
    romani
    on Jul 29, 2025
    Member
    More actions

    We will set format to have all combinations of todo: by case in each letter , except TODO.

    Reacted by Mohit Sharma
  2. romani
    added
    approved
    on Jul 29, 2025
  3. romani
    added this to Polishing Google Style implementationon Jul 29, 2025
  4. romani
    moved this to Todo in Polishing Google Style implementationon Jul 29, 2025
  5. Zopsss commented on Aug 8, 2025

    @Zopsss
    Zopsss
    on Aug 8, 2025
    Member
    More actions
      void myFunc(int i) {
        // todo: implementing  // EXPECTED VIOLATION
      }
    
      void myFunc1(int i) {
        // Todo: implementing  // EXPECTED VIOLATION
      }
      
      void myFunc2(int i) {
        // toDo: implementing  // EXPECTED VIOLATION
      }

    I'm assuming that the above mention cases are not false-negatives. Style guide mentions that TODO should be in all caps. So we should give violation, in other words, notify user about the only those TODO comments which has TODO written in all caps.

    The above mentioned cases should give violations to guide users to use todo comments in all caps.

  6. romani commented on Aug 9, 2025

    @romani
    romani
    on Aug 9, 2025
    Member
    More actions

    No . All of them should be violations.
    Todo comments are allowed by Google style, but in format // TODO: ...... . All Todo comments are aligned in format ( all caps).

    A TODO comment begins with the word TODO in all caps, a following colon

  7. romani
    added
    google style
    on Aug 9, 2025
  8. mohitsatr
    added 2 commits that reference this issue on Aug 11, 2025

    Issue checkstyle#17501: Add TodoComment Check to the google config

    b245d10

    Issue checkstyle#17501: Add TodoComment Check to the google config

    7c983c3
  9. Zopsss
    moved this from Todo to In Progress in Polishing Google Style implementationon Aug 12, 2025
  10. mohitsatr
    added 3 commits that reference this issue on Aug 13, 2025

    Issue checkstyle#17501: Add TodoComment Check to the google config

    e720221

    Issue checkstyle#17501: Add TodoComment Check to the google config

    ff6c96f

    Issue checkstyle#17501: Add TodoComment Check to the google config

    6c03c89
  11. romani
    closed this as completedin #17599on Aug 16, 2025
  12. romani
    added a commit that references this issue on Aug 16, 2025

    Issue #17501: Add TodoComment Check to the google config

    89aca7f
  13. github-project-automation
    moved this from In Progress to Done in Polishing Google Style implementationon Aug 16, 2025
  14. github-actions
    added this to the 11.0.1 milestone on Aug 16, 2025
  15. romani
    added
    bug
    on Aug 16, 2025
  16. romani
    changed the title [-]Word TODO of Todo comment must be in all caps[/-] [+]Google style: Word TODO of Todo comment must be in all caps[/+] on Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedbuggoogle style

    Type

    No type

    Projects

      • Polishing Google Style implementation
        Closed
        Status
        Done
        Show more project fields

      Milestone

      • 11.0.1

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.