Commit 7ed8dd8
committed
fix: Correct YAML syntax in harmony-check workflow with proper heredoc indentation
Fixed critical YAML syntax error in harmony-check.yml caused by incorrect
heredoc indentation:
**Problem:**
- Python heredoc content and terminators were unindented (column 0)
- This broke YAML's literal block (run: |) parsing
- YAML parser failed with "could not find expected ':'" error
- GitHub Actions workflows would not run
**Root Cause:**
In YAML literal blocks (|), all lines must maintain consistent base indentation.
The heredoc pattern `python3 << 'EOF'` with unindented Python code and EOF
terminator violated this requirement.
**Solution:**
1. Changed `<< 'PYTHON_SCRIPT'` to `<<'PYTHON_SCRIPT'` (no space)
2. Indented all Python code to match surrounding bash code (10 spaces)
3. Indented PYTHON_SCRIPT terminators to match (10 spaces)
This preserves YAML structure while bash correctly strips the indentation
when processing the heredoc.
**Files Fixed:**
- Job 2 (harmony-json-report), Step 3: Generate JSON Harmony Report
- Job 2 (harmony-json-report), Step 5: Display Top 5 Disharmonious Functions
**Testing:**
- ✅ YAML validates with Python yaml.safe_load()
- ✅ Extracted bash script executes correctly
- ✅ JSON parsing works as expected
- ✅ All heredoc syntax functional
This resolves the CI workflow failures reported by the user.1 parent 89c805e commit 7ed8dd8
1 file changed
+42
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
0 commit comments