Skip to content

Commit cd8d4cf

Browse files
Fix: Use -print0 and -0 with xargs for harmony checks
Co-authored-by: taurekaw <taurekaw@gmail.com>
1 parent 96cdce8 commit cd8d4cf

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ jobs:
4545
# v1.2+: Harmony check with automatic exit codes
4646
# Note: Currently informational as source has some disharmony
4747
# (This demonstrates the tool working - it found semantic issues!)
48-
find harmonizer -name "*.py" -type f | xargs harmonizer || echo "⚠️ Disharmony found (tool is working correctly!)"
48+
find harmonizer -name "*.py" -type f -print0 | xargs -0 harmonizer || echo "⚠️ Disharmony found (tool is working correctly!)"
4949
continue-on-error: true

.github/workflows/harmony-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
# Exit codes: 0=harmonious, 1=medium, 2=high, 3=critical
3535
# Note: Currently informational as source code itself has some disharmony
3636
# (main.py functions do more than their names suggest - great meta example!)
37-
find harmonizer -name "*.py" -type f | xargs harmonizer || {
37+
find harmonizer -name "*.py" -type f -print0 | xargs -0 harmonizer || {
3838
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
3939
echo "⚠️ Source code has disharmony (demonstrates tool working!)"
4040
echo " This is a great example of semantic issues the tool catches."
@@ -50,7 +50,7 @@ jobs:
5050
echo "📊 Checking Test Code Harmony (informational only)..."
5151
5252
# For tests, we allow higher disharmony (don't fail the build)
53-
find tests -name "*.py" -type f | xargs harmonizer || echo "⚠️ Test code has some disharmony (acceptable)"
53+
find tests -name "*.py" -type f -print0 | xargs -0 harmonizer || echo "⚠️ Test code has some disharmony (acceptable)"
5454
continue-on-error: true
5555

5656
# Job 2: Detailed JSON Report with Artifact
@@ -76,7 +76,7 @@ jobs:
7676
echo "📋 Generating detailed JSON harmony report..."
7777
7878
# Generate JSON report for all Python files
79-
find harmonizer examples tests -name "*.py" -type f | xargs harmonizer --format json > harmony-report.json 2>/dev/null || true
79+
find harmonizer examples tests -name "*.py" -type f -print0 | xargs -0 harmonizer --format json > harmony-report.json 2>/dev/null || true
8080
8181
# Display summary if report was generated
8282
if [ -f harmony-report.json ] && [ -s harmony-report.json ]; then
@@ -170,7 +170,7 @@ jobs:
170170
171171
# Use stricter threshold (0.3 instead of default 0.5)
172172
# This catches even minor semantic drift
173-
if find harmonizer -name "*.py" -type f | xargs harmonizer --threshold 0.3; then
173+
if find harmonizer -name "*.py" -type f -print0 | xargs -0 harmonizer --threshold 0.3; then
174174
echo "✅ Code meets excellent harmony standards!"
175175
else
176176
echo ""

.github/workflows/ljpw_gate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+
pip install -e .
2526
2627
- name: Run LJPW Harmony Check
2728
run: |

0 commit comments

Comments
 (0)