Postgress connection standardization #2230
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Line Ending Linter | |
| on: | |
| push: | |
| branches: ["**"] # Runs on every push to every branch | |
| pull_request: | |
| branches: ["**"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-crlf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Scan for CRLF (\r) | |
| run: | | |
| # List files with \r, excluding the .git directory | |
| BAD_FILES=$(grep -rIl $'\r' --exclude-dir=.git --exclude-dir=windows . || true) | |
| if [ -n "$BAD_FILES" ]; then | |
| echo "ERROR: CRLF (Windows) line endings detected!" | |
| echo "The following files must be LF:" | |
| echo "$BAD_FILES" | |
| echo "" | |
| echo "FIX: Run these commands on your machine:" | |
| echo " git add --renormalize ." | |
| echo " git commit -m 'fix: normalize line endings'" | |
| echo " git push" | |
| exit 1 | |
| else | |
| echo "OK: All files are clean (LF)." | |
| fi |