Skip to content

Commit 183d3e1

Browse files
committed
new plan
1 parent 2c1ea57 commit 183d3e1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

module/core/strs_tools/plan.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* 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.
55
* Ensure the `strs_tools` crate has no clippy warnings.
66
* Address pending visibility refinement for `private` module in `split.rs`.
7+
* **Ensure strict adherence to all codestyle rules defined in `code/rules/codestyle.md`.**
78

89
### Progress
910
* ✅ Increment 1: Stabilize current quoting logic & address warnings (Stuck Resolution)
@@ -13,6 +14,7 @@
1314
* ✅ Increment 3: Address Clippy Lints (Code Style & Refactoring) in `strs_tools`
1415
* ✅ Increment 4: Add Missing Documentation & Fix `missing_panics_doc` in `strs_tools`
1516
* ✅ Increment 5: Revert `pub mod private` to `cfg`-gated visibility in `split.rs`
17+
* ⚫ Increment 6: Apply Strict Codestyle Rules to `strs_tools`
1618

1719
### Target Crate
1820
* `module/core/strs_tools`
@@ -137,18 +139,34 @@
137139
* 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)
138140
* Commit Message: `refactor(strs_tools): Refine visibility of private module in split.rs using cfg`
139141

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+
140156
### Task Requirements
141157
* All changes must be within `module/core/strs_tools`.
142158
* 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).
143159
* The `debug_hang_split_issue` test in `strs_tools` must pass.
144160
* 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`).
145161
* 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`.**
146163

147164
### Project Requirements
148165
* Must use Rust 2021 edition.
149166
* All new APIs must be async (not applicable for this task).
150167
* All dependencies must be centralized in workspace `Cargo.toml`.
151168
* Lints must be defined in workspace `Cargo.toml` and inherited by crates.
169+
* **New Global Constraint:** Never use `#[allow(clippy::missing_errors_doc)]`.
152170

153171
### Notes & Insights
154172
* 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

Comments
 (0)