|
34 | 34 | # Exit codes: 0=harmonious, 1=medium, 2=high, 3=critical |
35 | 35 | # Note: Currently informational as source code itself has some disharmony |
36 | 36 | # (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 || { |
38 | 38 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" |
39 | 39 | echo "⚠️ Source code has disharmony (demonstrates tool working!)" |
40 | 40 | echo " This is a great example of semantic issues the tool catches." |
|
50 | 50 | echo "📊 Checking Test Code Harmony (informational only)..." |
51 | 51 |
|
52 | 52 | # 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)" |
54 | 54 | continue-on-error: true |
55 | 55 |
|
56 | 56 | # Job 2: Detailed JSON Report with Artifact |
|
76 | 76 | echo "📋 Generating detailed JSON harmony report..." |
77 | 77 |
|
78 | 78 | # 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 |
80 | 80 |
|
81 | 81 | # Display summary if report was generated |
82 | 82 | if [ -f harmony-report.json ] && [ -s harmony-report.json ]; then |
@@ -170,7 +170,7 @@ jobs: |
170 | 170 |
|
171 | 171 | # Use stricter threshold (0.3 instead of default 0.5) |
172 | 172 | # 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 |
174 | 174 | echo "✅ Code meets excellent harmony standards!" |
175 | 175 | else |
176 | 176 | echo "" |
|
0 commit comments