|
4 | 4 | * Modify `strs_tools::string::split::SplitIterator` to correctly tokenize strings containing quoted sections, ensuring that internal delimiters (e.g., spaces, `::`) within a quoted section are *not* treated as delimiters. The entire content of a quoted section (excluding outer quotes, but including escaped inner quotes and delimiters) should be returned as a single `Delimeted` item. |
5 | 5 | * Ensure the `strs_tools` crate has no clippy warnings. |
6 | 6 | * Address pending visibility refinement for `private` module in `split.rs`. |
| 7 | +* **Ensure strict adherence to all codestyle rules defined in `code/rules/codestyle.md`.** |
7 | 8 |
|
8 | 9 | ### Progress |
9 | 10 | * ✅ Increment 1: Stabilize current quoting logic & address warnings (Stuck Resolution) |
|
13 | 14 | * ✅ Increment 3: Address Clippy Lints (Code Style & Refactoring) in `strs_tools` |
14 | 15 | * ✅ Increment 4: Add Missing Documentation & Fix `missing_panics_doc` in `strs_tools` |
15 | 16 | * ✅ Increment 5: Revert `pub mod private` to `cfg`-gated visibility in `split.rs` |
| 17 | +* ⚫ Increment 6: Apply Strict Codestyle Rules to `strs_tools` |
16 | 18 |
|
17 | 19 | ### Target Crate |
18 | 20 | * `module/core/strs_tools` |
|
137 | 139 | * Execute `cargo clippy -p strs_tools -- -D warnings` via `execute_command`. Analyze output, no new warnings should be introduced, and ideally, all previous warnings should be gone. (Done) |
138 | 140 | * Commit Message: `refactor(strs_tools): Refine visibility of private module in split.rs using cfg` |
139 | 141 |
|
| 142 | +* ⚫ Increment 6: Apply Strict Codestyle Rules to `strs_tools` |
| 143 | + * Detailed Plan Step 1: Read `module/core/strs_tools/src/string/split.rs` and `module/core/strs_tools/src/lib.rs`. |
| 144 | + * Detailed Plan Step 2: Systematically review the code in these files against each rule in `code/rules/codestyle.md`. |
| 145 | + * Detailed Plan Step 3: For each identified deviation, prepare an `apply_diff` operation to correct it. Prioritize grouping multiple small changes into a single `apply_diff` call where possible. |
| 146 | + * Detailed Plan Step 4: Apply the diffs using `apply_diff`. |
| 147 | + * Pre-Analysis: This is a manual review and correction process. Focus on formatting, spacing, newlines, attribute placement, and `use` statement organization. |
| 148 | + * Crucial Design Rules: [Code Style: Do Not Reformat Arbitrarily], [New Lines for Blocks], [Indentation], [Spaces Around Symbols], [Attributes: Spaces], [Attributes: Separate Attributes from Items], [Where Clause Formatting], [Trait Implementation Formatting], [Function Signature Formatting], [Comments: Spaces], [Nesting], [Code Length], [Lifetime Annotations]. |
| 149 | + * Relevant Behavior Rules: N/A. |
| 150 | + * Verification Strategy: |
| 151 | + * Execute `cargo fmt --check -p strs_tools` via `execute_command`. Analyze output (expecting no unformatted files). |
| 152 | + * Execute `cargo clippy -p strs_tools -- -D warnings` via `execute_command`. Analyze output (expecting no warnings). |
| 153 | + * Execute `cargo test -p strs_tools --all-targets` via `execute_command`. Analyze output (all tests must pass). |
| 154 | + * Commit Message: `style(strs_tools): Apply strict codestyle rules` |
| 155 | + |
140 | 156 | ### Task Requirements |
141 | 157 | * All changes must be within `module/core/strs_tools`. |
142 | 158 | * The solution should follow "Option 1 (Preferred): Modify `SplitIterator` to dynamically adjust `SplitFastIterator`'s delimiters." from the task description. (This seems completed by prior increments). |
143 | 159 | * The `debug_hang_split_issue` test in `strs_tools` must pass. |
144 | 160 | * All tests in `module/move/unilang_instruction_parser` (especially those related to quoted arguments) must pass after this change is implemented in `strs_tools`. (Note: This requirement is now addressed by proposing a fix to `unilang_instruction_parser`). |
145 | 161 | * The `strs_tools` crate must have no clippy warnings after all increments are complete. |
| 162 | +* **The `strs_tools` crate must strictly adhere to all codestyle rules defined in `code/rules/codestyle.md`.** |
146 | 163 |
|
147 | 164 | ### Project Requirements |
148 | 165 | * Must use Rust 2021 edition. |
149 | 166 | * All new APIs must be async (not applicable for this task). |
150 | 167 | * All dependencies must be centralized in workspace `Cargo.toml`. |
151 | 168 | * Lints must be defined in workspace `Cargo.toml` and inherited by crates. |
| 169 | +* **New Global Constraint:** Never use `#[allow(clippy::missing_errors_doc)]`. |
152 | 170 |
|
153 | 171 | ### Notes & Insights |
154 | 172 | * The `last_yielded_token_was_delimiter` state in `SplitIterator` was key to correctly inserting empty segments before a quote that followed a delimiter when `preserving_empty` is true. |
|
0 commit comments