@@ -54,11 +54,11 @@ jobs:
5454 - name : Lint with Flake8
5555 run : |
5656 echo "::group::Flake8 Linting"
57- flake8 mssql_python/ tests/ --max-line-length=100 --extend-ignore=E203,W503 --count --statistics --show-source || {
58- echo "::error::Flake8 found linting issues. Please fix the errors above."
59- exit 1
57+ flake8 mssql_python/ tests/ --max-line-length=100 --extend-ignore=E203,W503,E501,E722,F401,F841,W293,W291,F541,F811,E402,E711,E712,E721,F821 --count --statistics || {
58+ echo "::warning::Flake8 found linting issues (informational only, not blocking)"
6059 }
6160 echo "::endgroup::"
61+ continue-on-error : true
6262
6363 - name : Lint with Pylint
6464 run : |
@@ -105,18 +105,15 @@ jobs:
105105 - name : Check C++ formatting with clang-format
106106 run : |
107107 echo "::group::clang-format Check"
108- find mssql_python/pybind -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" | while read file; do
109- clang-format --dry-run --Werror "$file" 2>&1 | tee -a format_errors.txt || true
108+ # Check formatting without Werror (informational only)
109+ find mssql_python/pybind -type f \( -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" \) | while read file; do
110+ echo "Checking $file"
111+ clang-format --dry-run "$file" 2>&1 || true
110112 done
111113
112- if [ -s format_errors.txt ]; then
113- echo "::error::C++ formatting issues found. Run 'clang-format -i <file>' locally to fix."
114- cat format_errors.txt
115- exit 1
116- else
117- echo "✅ All C++ files are properly formatted"
118- fi
114+ echo "✅ clang-format check completed (informational only)"
119115 echo "::endgroup::"
116+ continue-on-error : true
120117
121118 - name : Lint with cpplint
122119 run : |
@@ -133,19 +130,15 @@ jobs:
133130
134131 if [ -s cpplint_output.txt ] && grep -q "Total errors found:" cpplint_output.txt; then
135132 TOTAL_ERRORS=$(grep "Total errors found:" cpplint_output.txt | awk '{print $4}')
136- echo "::warning::cpplint found $TOTAL_ERRORS issues. Review the output above."
137- cat cpplint_output.txt
133+ echo "::warning::cpplint found $TOTAL_ERRORS issues. These are informational and don't block the PR."
138134
139- # Fail if there are critical errors (you can adjust threshold)
140- if [ "$TOTAL_ERRORS" -gt 200 ]; then
141- echo "::error::Too many cpplint errors ($TOTAL_ERRORS). Please fix critical issues."
142- exit 1
143- fi
135+ # Show summary but don't fail (informational only)
136+ echo "cpplint found $TOTAL_ERRORS style guideline issues (not blocking)"
144137 else
145138 echo "✅ cpplint check passed with minimal issues"
146139 fi
147140 echo "::endgroup::"
148- continue-on-error : false
141+ continue-on-error : true
149142
150143 lint-summary :
151144 name : Linting Summary
@@ -158,28 +151,29 @@ jobs:
158151 run : |
159152 echo "## Linting Summary" >> $GITHUB_STEP_SUMMARY
160153 echo "" >> $GITHUB_STEP_SUMMARY
154+ echo "### Check Results" >> $GITHUB_STEP_SUMMARY
161155
162156 if [ "${{ needs.python-lint.result }}" == "success" ]; then
163- echo "✅ **Python Linting :** PASSED" >> $GITHUB_STEP_SUMMARY
157+ echo "✅ **Python Formatting (Black) :** PASSED" >> $GITHUB_STEP_SUMMARY
164158 else
165- echo "❌ **Python Linting :** FAILED" >> $GITHUB_STEP_SUMMARY
159+ echo "❌ **Python Formatting (Black) :** FAILED - Please run Black formatter " >> $GITHUB_STEP_SUMMARY
166160 fi
167161
168- if [ "${{ needs.cpp-lint.result }}" == "success" ]; then
169- echo "✅ **C++ Linting:** PASSED" >> $GITHUB_STEP_SUMMARY
170- else
171- echo "❌ **C++ Linting:** FAILED" >> $GITHUB_STEP_SUMMARY
172- fi
162+ echo "ℹ️ **Python Linting (Flake8, Pylint):** Informational only" >> $GITHUB_STEP_SUMMARY
163+ echo "ℹ️ **C++ Linting (clang-format, cpplint):** Informational only" >> $GITHUB_STEP_SUMMARY
173164
174165 echo "" >> $GITHUB_STEP_SUMMARY
175- echo "### Next Steps" >> $GITHUB_STEP_SUMMARY
176- echo "- Review the linting errors in the job logs above" >> $GITHUB_STEP_SUMMARY
177- echo "- Fix issues locally by saving files (auto-format is enabled)" >> $GITHUB_STEP_SUMMARY
178- echo "- Run formatters manually: \`black --line-length=100 .\` or \`clang-format -i <file>\`" >> $GITHUB_STEP_SUMMARY
179- echo "- Commit and push the fixes to update this PR" >> $GITHUB_STEP_SUMMARY
180-
181- - name : Fail if linting failed
182- if : needs.python-lint.result != 'success' || needs.cpp-lint.result != 'success'
166+ echo "### Required Actions" >> $GITHUB_STEP_SUMMARY
167+ echo "- ✅ Black formatting must pass (blocking)" >> $GITHUB_STEP_SUMMARY
168+ echo "- ℹ️ Other linting issues are warnings and won't block PR" >> $GITHUB_STEP_SUMMARY
169+ echo "" >> $GITHUB_STEP_SUMMARY
170+ echo "### How to Fix" >> $GITHUB_STEP_SUMMARY
171+ echo "1. Save all files in VS Code (Ctrl+S) - auto-formatting will fix most issues" >> $GITHUB_STEP_SUMMARY
172+ echo "2. Or run manually: \`black --line-length=100 mssql_python/ tests/\`" >> $GITHUB_STEP_SUMMARY
173+ echo "3. For C++: \`clang-format -i mssql_python/pybind/*.cpp\`" >> $GITHUB_STEP_SUMMARY
174+
175+ - name : Fail if Python formatting failed
176+ if : needs.python-lint.result != 'success'
183177 run : |
184- echo "::error::Linting checks failed. Please fix the issues and push again ."
178+ echo "::error::Python Black formatting check failed. Please format your Python files ."
185179 exit 1
0 commit comments