Implements the logic behind Rails::Command::NotesCommand. See rails notes --help for usage information.
Annotation objects are triplets :line, :tag, :text that represent the line where the annotation lives, its tag, and its text. Note the filename is not stored.
Annotations are looked for in comments and modulus whitespace they have to start with the tag optionally followed by a colon. Everything up to the end of the line (or closing ERB comment tag) is considered to be their text.
| Use Case | Command | Description |
|---|---|---|
| List all annotations | rails notes | Display all TODO, FIXME, OPTIMIZE annotations in the application |
| Custom annotation tags | rails notes --tag CUSTOM | Filter annotations by a specific tag |
| Show source files | rails notes --annotations | Display annotations with file paths and line numbers |
| Register custom annotation source | Rails::SourceAnnotationExtractor.enumerate | Enumerate annotation sources to add custom directories |
enumerate — returns list of annotation sourcesnew — creates a new extractor instancedisplay — outputs annotations to consoleextract_annotations_from — extracts annotations from a given filefind — finds annotations in the projectfind_in — finds annotations in a specific directorytag — returns the tag used for annotation extractionattr_reader tag — the tag string used to filter annotationsGenerated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-29 12:47 @216.73.217.111
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format