Skip to content

Commit 8b81580

Browse files
committed
Add Magic Strings skip/disable
1 parent 5e12f12 commit 8b81580

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4545
#### --skip-magic-strings Flag - Last Resort for Timeout Issues
4646

4747
- **Added `--skip-magic-strings` command-line flag** to completely skip Magic String Detector phase
48+
- **Alias:** `--disable-magic-strings` (both flags work identically)
4849
- **Use case:** Last resort option when scans timeout during Magic String Detector aggregation
4950
- **Behavior:** Shows warning message "⚠ Skipped (--skip-magic-strings flag enabled)" and bypasses entire phase
5051
- **Pattern:** Follows same approach as existing `--skip-clone-detection` flag
5152
- **Impact:** Allows scans to complete even when Magic String Detector would timeout
5253
- **Trade-off:** Skips detection of duplicate option names, transient keys, and capability strings
53-
- **Example:** `wpcc --paths . --skip-magic-strings --format json`
54+
- **Examples:**
55+
- `wpcc --paths . --skip-magic-strings --format json`
56+
- `wpcc --paths . --disable-magic-strings --format json` (alias)
5457

5558
### Changed
5659

@@ -65,8 +68,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6568
- **Files Modified:**
6669
- `dist/bin/check-performance.sh`:
6770
- Added `SKIP_MAGIC_STRINGS=false` variable (line 150)
68-
- Added `--skip-magic-strings` to help text (line 471)
69-
- Added `--skip-magic-strings` argument parsing (lines 834-837)
71+
- Added `--skip-magic-strings` and `--disable-magic-strings` to help text (lines 471-472)
72+
- Added argument parsing for both flags (line 834: `--skip-magic-strings|--disable-magic-strings`)
7073
- Added skip logic for Magic String Detector (lines 6201-6218, closing fi at line 6272)
7174
- Added `load_wpcignore()` function (lines 900-941)
7275
- Added `build_grep_exclusions()` helper (lines 960-970)

PROJECT/3-COMPLETED/FEATURE-REQUEST-PERFORMANCE-IMPROVEMENTS-RESOLVED.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,18 @@ wpcc --paths . --format json
5454
wpcc --disable-magic-strings --disable-clone-detection --format json
5555
```
5656

57-
**Implemented:**
57+
**Implemented:** Both naming conventions supported!
5858
```bash
59+
# Original implementation (--skip-* pattern)
5960
wpcc --skip-magic-strings --skip-clone-detection --format json
61+
62+
# Alias (--disable-* pattern - matches feature request)
63+
wpcc --disable-magic-strings --skip-clone-detection --format json
6064
```
6165

6266
**Available flags:**
6367
-`--skip-magic-strings` (NEW in v2.2.5) - Skip Magic String Detector
68+
-`--disable-magic-strings` (NEW in v2.2.5) - Alias for --skip-magic-strings
6469
-`--skip-clone-detection` (existing) - Skip Function Clone Detector
6570

6671
---

dist/bin/check-performance.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ OPTIONS:
469469
--ignore-baseline Ignore baseline file even if present
470470
--enable-clone-detection Enable function clone detection (disabled by default for performance)
471471
--skip-magic-strings Skip Magic String Detector (last resort for timeout issues)
472+
--disable-magic-strings Alias for --skip-magic-strings
472473
473474
AI TRIAGE OPTIONS:
474475
@@ -831,7 +832,7 @@ while [[ $# -gt 0 ]]; do
831832
SKIP_CLONE_DETECTION=true
832833
shift
833834
;;
834-
--skip-magic-strings)
835+
--skip-magic-strings|--disable-magic-strings)
835836
SKIP_MAGIC_STRINGS=true
836837
shift
837838
;;

0 commit comments

Comments
 (0)