You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Footer**: "Generated by WP Code Check by Hypercart" with link to https://WPCodeCheck.com
43
+
-**Link Styling**: Blue (#6366f1) clickable link that opens in new tab
44
+
10
45
### Changed
11
46
47
+
-**GitHub Actions CI Trigger** - Simplified CI workflow to only run on pull requests
48
+
-**Before**: Workflow ran on both `push` and `pull_request` events for main, development, and feature branches
49
+
-**After**: Workflow only runs on `pull_request` events targeting main or development branches
50
+
-**Rationale**: Reduces redundant CI runs and focuses testing on code review stage
51
+
-**Impact**: CI runs only when PRs are opened/updated, not on every commit to branches
52
+
12
53
-**DRY Refactor: Consolidated Grouping Logic** - Created centralized `group_and_add_finding()` helper function
13
54
-**Before**: Duplicate grouping logic in `run_check()` function and admin capability check (92 lines duplicated)
14
55
-**After**: Single reusable helper function (56 lines) used by both code paths
@@ -22,6 +63,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
63
23
64
### Fixed
24
65
66
+
-**Robust Line Number Validation** - Added numeric validation for line numbers before arithmetic operations
67
+
-**Issue**: `grep` can occasionally output non-standard formats (e.g., "Binary file ... matches") that would make `lineno` empty or non-numeric
68
+
-**Risk**: Using non-numeric `lineno` in bash arithmetic (`$((lineno - last_line))`) would trigger bash errors and break JSON generation
69
+
-**Fix**: Added `[[ "$lineno" =~ ^[0-9]+$ ]]` validation in three locations:
70
+
-`run_check()` function - before grouping findings (line 1331)
71
+
-`group_and_add_finding()` function - before arithmetic operations (line 1262)
72
+
-`format_finding()` function - before context line calculations (line 925)
73
+
-**Behavior**: Non-numeric line numbers are now silently skipped instead of causing script errors
74
+
-**Impact**: More robust JSON generation even when scanning binary files or encountering unexpected grep output
75
+
76
+
-**GitHub Actions CI Exit Code Handling** - Fixed CI workflow to handle non-zero exit codes gracefully
77
+
-**Issue**: Performance checks on the toolkit repository itself may find issues (intentional test patterns)
78
+
-**Problem**: Non-zero exit codes from `check-performance.sh` would fail the CI workflow
79
+
-**Fix**: Added `|| EXIT_CODE=$?` capture and `exit 0` to make the step informational rather than blocking
80
+
-**Behavior**: CI now shows a warning if issues are found but doesn't fail the workflow
81
+
-**Impact**: CI can complete successfully while still reporting any detected issues
82
+
83
+
-**Baseline Test Script Exit Code Handling** - Fixed `test-baseline-functionality.sh` to properly capture exit codes with `set -e`
84
+
-**Issue**: Script uses `set -e` which terminates immediately on non-zero exit codes
85
+
-**Problem**: When `check-performance.sh` returns non-zero (expected when errors are found), the test script would terminate before capturing `$EXIT_CODE`
86
+
-**Fix**: Temporarily disable `set -e` around command execution using `set +e` / `set -e` wrapper
87
+
-**Locations Fixed**: All 4 test scenarios (baseline generation, suppression, new issue detection, ignore-baseline)
88
+
-**Impact**: Tests can now properly validate exit codes without premature termination
89
+
25
90
-**HTML Report Path Display** - Fixed "Paths Scanned" showing `.` instead of full absolute path
26
91
-**Issue**: When scanning with `--paths .`, the HTML report header showed "Paths Scanned: ." instead of the full directory path
27
92
-**Root Cause**: Display was using the original relative path variable instead of the resolved absolute path
0 commit comments