Skip to content

Conversation

@atrtde
Copy link
Owner

@atrtde atrtde commented Jan 7, 2026

Summary by CodeRabbit

  • New Features

    • Added CLI flags (--ignore-case, --no-require-colon) and .todorc.json/.todorc.yaml config options for flexible tag pattern matching.
  • Improvements

    • Stricter default tag format requirements (uppercase, colon-required) to reduce false positives.
  • Documentation

    • Updated README with new defaults, usage examples, and rationale.
    • Added comprehensive CHANGELOG with version history and migration guide.

✏️ Tip: You can customize this high-level summary in your review settings.

@atrtde atrtde self-assigned this Jan 7, 2026
Copilot AI review requested due to automatic review settings January 7, 2026 21:55
@atrtde atrtde added the bug Something isn't working label Jan 7, 2026
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

TODO Report

Showing TODOs in changed files only

Found 69 TODO(s) in 4 file(s):

Summary by tag
Tag Count
TODO 50
FIXME 14
BUG 5
Details by file

/home/runner/work/todo-tree/todo-tree/.github/workflows/todo-tree-action.yml

  • 🟡 TODO (L28): Report"

/home/runner/work/todo-tree/todo-tree/README.md

  • 🟡 TODO (L1): Tree
  • 🟡 TODO (L187): This will be found ✓
  • 🔴 FIXME (L188): This will be found ✓
  • 🔴 BUG (L189): This will be found ✓
  • 🟡 TODO (L191): This will NOT be found (lowercase) ✗
  • 🟡 TODO (L192): This will NOT be found (no colon) ✗
  • 🟡 TODO (L193): This will NOT be found (mixed case) ✗
  • 🟡 TODO (L198): Assigned to john ✓
  • 🔴 FIXME (L199): Needs team review ✓

/home/runner/work/todo-tree/todo-tree/cli/src/lib.rs

  • 🟡 TODO (L443): Implement main logic
  • 🔴 FIXME (L445): This is broken
  • 🟡 TODO (L456): Add documentation
  • 🔴 BUG (L457): Memory leak here
  • 🟡 TODO (L517): Medium priority
  • 🔴 BUG (L518): Critical priority
  • 🟡 TODO (L543): Test").unwrap();
  • 🟡 TODO (L563): Line 2
  • 🟡 TODO (L565): Line 4
  • 🟡 TODO (L566): Line 5

/home/runner/work/todo-tree/todo-tree/cli/src/parser.rs

  • 🟡 TODO (L230): Fix this later", 1);
  • 🟡 TODO (L242): Implement this", 5);
  • 🔴 FIXME (L254): This is broken", 1);
  • 🟡 TODO (L266): lowercase", 1);
  • 🟡 TODO (L270): mixed case", 1);
  • 🟡 TODO (L279): uppercase", 1);
  • 🟡 TODO (L282): lowercase", 1);
  • 🟡 TODO (L291): First item
  • 🔴 FIXME (L293): Second item
  • 🟡 TODO (L317): fix this", 1);
  • 🟡 TODO (L325): fix this", 1);
  • 🟡 TODO (L338): something", 1);
  • 🟡 TODO (L345): Handle special chars: @#$%^&*()", 1);
  • 🟡 TODO (L393): First item
  • 🔴 FIXME (L395): Second item
  • 🟡 TODO (L442): Test".to_string()),
  • 🟡 TODO (L452): Test".to_string()),
  • 🟡 TODO (L510): add milk", 1);
  • 🟡 TODO (L520): with Unicode characters in the message should work
  • 🟡 TODO (L523): añadir más café", 1);
  • 🟡 TODO (L560): in a comment after CJK text should match
  • 🟡 TODO (L564): task here", 1);
  • 🟡 TODO (L600): This is a real todo
  • 🔴 FIXME (L602): Another real one
  • 🟡 TODO (L813): update package.json scripts", 1);
  • 🟡 TODO (L871): implement this", 1);
  • 🔴 FIXME (L877): broken code", 1);
  • 🟡 TODO (L884): implement this", 1);
  • 🔴 FIXME (L888): broken code", 1);
  • 🟡 TODO (L899): implement this", 1);
  • 🔴 FIXME (L906): broken code", 1);
  • 🟡 TODO (L913): implement this", 1);
  • 🟡 TODO (L922): implement this", 1);
  • 🔴 FIXME (L928): broken", 1);
  • 🟡 TODO (L941): implement this", 1);
  • 🟡 TODO (L952): implement this", 1);
  • 🟡 TODO (L956): implement this", 1);
  • 🟡 TODO (L959): implement this", 1);
  • 🟡 TODO (L982): fix this",
  • 🔴 FIXME (L983): broken",
  • 🟡 TODO (L984): update */",
  • 🟡 TODO (L985): database migration",
  • 🟡 TODO (L986): html comment -->",
  • 🟡 TODO (L1001): this is wrong",
  • 🔴 FIXME (L1002): bad code",
  • 🔴 BUG (L1004): in the code",
  • 🟡 TODO (L1019): mixed case",
  • 🔴 FIXME (L1020): mixed case",
  • 🔴 BUG (L1022): mixed case",

Last updated: 2026-01-07T22:25:52.282Z

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Warning

Rate limit exceeded

@alexandretrotel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3d6f951 and beeebe5.

📒 Files selected for processing (10)
  • .github/workflows/todo-tree-action.yml
  • CHANGELOG.md
  • README.md
  • cli/.todorc.example.json
  • cli/.todorc.json
  • cli/src/cli.rs
  • cli/src/config.rs
  • cli/src/lib.rs
  • cli/src/parser.rs
  • flake.nix
📝 Walkthrough

Walkthrough

Version 0.3.0 introduces stricter defaults (case_sensitive to true, require_colon to true) and adds new CLI flags (--ignore-case, --no-require-colon) for flexible matching. Refactors config handling via new CliOptions struct, updates TodoParser with with_options constructor, and deprecates with_regex. Removes zed extension from workspace.

Changes

Cohort / File(s) Summary
Documentation & Config Defaults
CHANGELOG.md, README.md, cli/.todorc.example.json, cli/.todorc.json
Added comprehensive CHANGELOG documenting version history and breaking changes (0.3.0). Updated README with new default behavior, tag format requirements, and CLI/config option documentation. Updated example and live config files with case_sensitive: true and require_colon: true.
Manifest Version Bumps
Cargo.toml, cli/Cargo.toml, core/Cargo.toml
Bumped cli and core package versions from 0.2.1 to 0.3.0. Removed "extensions/zed" from workspace members in root Cargo.toml. Updated cli dependency on todo-tree-core to 0.3.0.
CLI Arguments & Structure
cli/src/cli.rs
Added new boolean flags to ScanArgs and ListArgs: ignore_case (default false) and no_require_colon (default false). Updated Default impl and From conversion to propagate new fields.
Config & Options Refactoring
cli/src/config.rs, cli/src/lib.rs
Introduced new public CliOptions struct to encapsulate all CLI overrides. Extended Config with require_colon field (default true) and updated Config::new defaults (case_sensitive: true). Reworked merge_with_cli to accept single CliOptions parameter with precedence logic: explicit case_sensitive takes priority, ignore_case overrides to false, no_require_colon disables colon requirement. Updated tests and scaffolding to align with new interface.
Parser Enhancements
cli/src/parser.rs
Added new public with_options(tags, case_sensitive, require_colon, custom_regex) constructor and deprecated with_regex (delegates to with_options with require_colon: true). Updated DEFAULT_REGEX to require colon after tag (removed :: alternative). Enhanced build_pattern to conditionally relax colon requirement when require_colon is false. Expanded tests for default/configured colon behavior and various language contexts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • PR #13: Modifies TodoParser with new constructors and DEFAULT_REGEX changes—directly overlaps this PR's parser refactoring and with_options/with_regex implementations.
  • PR #3: Workspace restructuring and core/cli/type-level changes—related to this PR's config refactoring, CliOptions introduction, and version updates.

Poem

🐰 A rabbit bounds through version three,
With stricter rules, more clarity!
Case-sensitive, colons gleam,
New CLI flags fulfill the dream—
From loose to tight, false to true,
The parser hops, refreshed anew! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: bumping the version to 0.3.0 and implementing stricter tag matching (case sensitivity and colon requirement), which aligns with the substantial modifications across configuration, CLI, and parser components.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@atrtde atrtde linked an issue Jan 7, 2026 that may be closed by this pull request
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cli/src/lib.rs (1)

327-327: Inconsistent case sensitivity default in cmd_stats.

The cmd_stats function uses TodoParser::new(&tags, false) with a hardcoded case_sensitive: false, which is inconsistent with the new v0.3.0 defaults where case sensitivity should be true by default. This means the stats command will use the old, more permissive matching behavior while scan/list use the strict defaults.

🔧 Suggested fix to align with new defaults
     // Get tags from CLI or config
     let tags = args.tags.clone().unwrap_or(config.tags.clone());

     // Create parser and scanner
-    let parser = TodoParser::new(&tags, false);
+    let parser = TodoParser::with_options(
+        &tags,
+        config.case_sensitive,
+        config.require_colon,
+        config.custom_pattern.as_deref(),
+    );
     let scanner = Scanner::new(parser, ScanOptions::default());
🤖 Fix all issues with AI agents
In @Cargo.toml:
- Line 3: Remove stale "extensions/zed" references from flake.nix: locate the
replaceStrings invocation that contains the "extensions/zed" replacement pattern
and delete that entry (or simplify the replaceStrings call if it becomes a
no-op), and update the filteredSrc definition to remove the exclusion of
"extensions/zed" (drop that path from the filter list). Ensure you only remove
the hardcoded "extensions/zed" patterns so replaceStrings and filteredSrc remain
valid for other entries.

In @cli/src/parser.rs:
- Around line 833-843: The test name and comments incorrectly reference Go while
using `::` syntax; rename the test `test_no_match_go_scope_resolution` to
something like `test_no_match_cpp_rust_scope_resolution` and update the inline
comments to say "C++/Rust scope resolution" or similar; keep the assertions and
the `TodoParser::new(...);` and `parse_line(...)` calls unchanged so the test
still verifies that `::`-style tokens (e.g., in `BindAddress { source:
std::io::Error },` and `fmt::Println("error")`) do not match.
🧹 Nitpick comments (2)
cli/src/cli.rs (2)

104-114: Clarify the comment about the default value.

The comment says "default: true" but the field itself defaults to false (line 137). The comment is describing the effective behavior when neither --case-sensitive nor --ignore-case is passed, not the field's default value. This could confuse readers.

📝 Suggested clarification
-    /// Case-sensitive tag matching (default: true, only uppercase tags match)
+    /// Explicitly enable case-sensitive tag matching (overrides config)
     #[arg(long)]
     pub case_sensitive: bool,

     /// Ignore case when matching tags (matches TODO, todo, Todo, etc.)
     #[arg(long)]
     pub ignore_case: bool,

     /// Don't require colon after tag (allow "TODO something" without colon)
     #[arg(long)]
     pub no_require_colon: bool,

173-183: Same comment clarification needed here.

Similar to the comment on ScanArgs, the "default: true" comment could be clarified to avoid confusion about the field's default value vs. the effective behavior.

📝 Suggested clarification
-    /// Case-sensitive tag matching (default: true, only uppercase tags match)
+    /// Explicitly enable case-sensitive tag matching (overrides config)
     #[arg(long)]
     pub case_sensitive: bool,

     /// Ignore case when matching tags (matches TODO, todo, Todo, etc.)
     #[arg(long)]
     pub ignore_case: bool,

     /// Don't require colon after tag (allow "TODO something" without colon)
     #[arg(long)]
     pub no_require_colon: bool,
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 911818b and 3d6f951.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • cli/.todorc.example.json
  • cli/.todorc.json
  • cli/Cargo.toml
  • cli/src/cli.rs
  • cli/src/config.rs
  • cli/src/lib.rs
  • cli/src/parser.rs
  • core/Cargo.toml
🧰 Additional context used
🧬 Code graph analysis (2)
cli/src/config.rs (1)
cli/src/cli.rs (1)
  • default (126-143)
cli/src/lib.rs (1)
cli/src/parser.rs (1)
  • with_options (72-86)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Agent
  • GitHub Check: Test (macos-latest, stable)
  • GitHub Check: Test (windows-latest, stable)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (25)
cli/.todorc.json (1)

18-19: Breaking change is well-justified and documented.

The stricter defaults (case_sensitive: true, require_colon: true) significantly reduce false positives in real-world code, such as namespace operators (std::io::Error) and variable names (ERROR_CODE). The CHANGELOG provides a clear migration path for users who need the old behavior.

CHANGELOG.md (1)

1-149: Excellent documentation of breaking changes.

The CHANGELOG is comprehensive and user-friendly:

  • Breaking changes are clearly marked and justified
  • Migration guide provides multiple options with concrete examples
  • Test coverage is documented, building confidence in the changes
  • Follows Keep a Changelog format and semantic versioning

This is a model example of how to communicate breaking changes to users.

cli/.todorc.example.json (1)

8-9: Good practice: keeping example in sync with defaults.

The example configuration correctly reflects the new stricter defaults, ensuring users who reference this file will understand the current behavior.

core/Cargo.toml (1)

3-3: Version bump correctly reflects breaking changes.

The 0.2.1 → 0.3.0 increment follows semantic versioning for the breaking changes introduced (stricter default matching behavior). This aligns with the broader 0.3.0 release across the workspace.

cli/Cargo.toml (1)

3-3: LGTM! Version bump is consistent.

The version bump to 0.3.0 for both the CLI package and its dependency on todo-tree-core is consistent with the PR objectives.

Also applies to: 28-28

README.md (2)

133-135: LGTM! Default values clearly documented.

The JSON configuration example now shows the new strict defaults (case_sensitive: true and require_colon: true), which aligns with the version 0.3.0 changes.


184-235: Excellent documentation of the stricter defaults and flexibility options.

The new sections clearly explain:

  • The stricter tag format requirements (UPPERCASE + colon)
  • Compliant vs. non-compliant examples
  • CLI flags and config options for flexible matching
  • Rationale for the strict defaults with concrete examples of false positives avoided

This will help users understand the breaking change and how to opt into the legacy behavior if needed.

cli/src/cli.rs (2)

138-140: LGTM! New fields initialized correctly.

The default values for ignore_case and no_require_colon are correctly set to false, allowing the config defaults to take precedence when these flags aren't explicitly set.


279-280: LGTM! New fields propagated correctly.

The conversion from ScanArgs to ListArgs correctly propagates the new ignore_case and no_require_colon fields.

cli/src/config.rs (3)

11-24: LGTM! Clean design for CLI options.

The CliOptions struct effectively encapsulates all CLI overrides and distinguishes between explicit flags (e.g., case_sensitive: Option<bool>) and boolean flags (e.g., ignore_case: bool), allowing proper precedence handling.


68-69: LGTM! Stricter defaults implemented correctly.

The new defaults (case_sensitive: true, require_colon: true) align with the PR objectives to reduce false positives.


143-187: LGTM! Merge logic handles precedence correctly.

The merge logic properly handles the precedence:

  1. Explicit --case-sensitive flag takes precedence
  2. --ignore-case flag forces case-insensitive matching
  3. --no-require-colon disables colon requirement
  4. Config file values are used as fallback

This provides a clean way to override config settings via CLI.

cli/src/lib.rs (4)

49-88: LGTM! Options resolution logic is well-structured.

The cmd_scan function correctly:

  1. Builds CliOptions from CLI arguments
  2. Merges them with config
  3. Resolves case_sensitive and require_colon with proper precedence
  4. Passes resolved options to TodoParser::with_options

143-182: LGTM! cmd_list follows the same pattern.

The cmd_list function applies the same clean pattern as cmd_scan for handling the new options.


720-725: LGTM! Tests updated consistently with new fields.

All test cases for ScanArgs are correctly updated to include the new ignore_case and no_require_colon fields with appropriate default values.

Also applies to: 751-755, 782-786


872-875: LGTM! ListArgs tests also updated consistently.

All test cases for ListArgs are correctly updated to include the new fields.

Also applies to: 899-901, 925-927

cli/src/parser.rs (9)

42-47: LGTM - Clear rationale for removing :: from default pattern.

The documentation clearly explains why :: was removed to prevent false positives with scope resolution operators. The updated DEFAULT_REGEX is correct.


68-68: LGTM - Stricter default behavior aligns with v0.3.0 objectives.

The new() method now enforces require_colon=true by default, reducing false positives as intended.


71-86: LGTM - Well-designed constructor with clear parameter semantics.

The with_options constructor provides fine-grained control over matching behavior while maintaining a clean API.


88-97: LGTM - Proper deprecation path for backward compatibility.

The deprecated with_regex method correctly delegates to with_options with require_colon=true, maintaining backward compatibility.


117-122: LGTM - Correct pattern modification for optional colon support.

The logic correctly replaces :(.*)with [:\\s]+(.*) when require_colon=false, allowing either colons or whitespace as separators. The check for custom_regex.is_none() ensures user-provided patterns are not modified.


314-333: LGTM - Thorough test coverage for colon requirement behavior.

The test correctly verifies both the new default (require_colon=true) and the configurable option (require_colon=false).


700-747: LGTM - Test updated to reflect stricter defaults.

The test appropriately verifies that markdown headings without colons no longer match with the new defaults, while still matching with the old-style configuration.


861-955: LGTM - Excellent test coverage for new default behaviors.

These tests comprehensively verify:

  • Default colon requirement (require_colon=true)
  • Configurable colon optionality (require_colon=false)
  • Default case sensitivity (case_sensitive=true)
  • Configurable case insensitivity (case_sensitive=false)

The test assertions are clear and the coverage is thorough.


958-1067: LGTM - Comprehensive edge case coverage.

These tests verify that the parser correctly handles various edge cases including Rust Result types, variable names containing tags, and different comment styles. The test coverage ensures the stricter defaults don't introduce false positives.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the version to 0.3.0 and introduces stricter tag matching defaults to reduce false positives in code scanning. The changes make tag matching case-sensitive and require a colon after tags by default, while providing CLI flags and configuration options for users who want the previous behavior.

Key changes:

  • Default tag matching now requires uppercase tags with a colon (e.g., TODO: instead of todo or TODO )
  • Removed :: from default comment markers to prevent false positives in Rust and C++ namespace code
  • Added --ignore-case and --no-require-colon CLI flags for flexible matching

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
core/Cargo.toml Version bump to 0.3.0
cli/Cargo.toml Version bump to 0.3.0 and updated core dependency
cli/src/parser.rs Updated regex pattern, added with_options() method, deprecated with_regex(), added comprehensive tests for new behavior
cli/src/lib.rs Updated to use new parser options and handle new CLI flags
cli/src/config.rs Added CliOptions struct, refactored merge_with_cli(), added require_colon field
cli/src/cli.rs Added --ignore-case and --no-require-colon flags to scan and list commands
cli/.todorc.json Updated defaults to case_sensitive: true and require_colon: true
cli/.todorc.example.json Updated example configuration with new defaults
README.md Added documentation for new defaults and migration guide
Cargo.toml Removed non-existent extensions/zed from workspace
Cargo.lock Updated dependencies and removed unused packages
CHANGELOG.md Added comprehensive changelog documenting breaking changes and migration path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@atrtde atrtde merged commit b201cdb into main Jan 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive

1 participant