Fix asprof incorrectly existing with non zero exit code #2721
Workflow file for this run
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: lint | |
| on: | |
| - push | |
| - pull_request | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| license-header: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check license headers | |
| uses: apache/skywalking-eyes/[email protected] | |
| markdown: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install prettier | |
| run: | | |
| npm install -g [email protected] | |
| make check-md | |
| eof-newline: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: EOF newline check | |
| env: | |
| offenders_path: /tmp/eof_newline_offenders.txt | |
| run: | | |
| find . -path './.git' -prune -o -exec file --mime-type {} + | grep 'text/' | awk -F: '{print $1}' | while read -r file; do | |
| # Read last byte and verify it's a newline | |
| if [ -s "$file" ] && [ "$(tail -c1 "$file" | wc -l)" -eq 0 ]; then | |
| echo "$file" >> "$offenders_path" | |
| fi | |
| done | |
| if [ -s "$offenders_path" ]; then | |
| cat "$offenders_path" | |
| exit 1 | |
| fi | |
| trailing-spaces: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Trailing spaces check | |
| env: | |
| offenders_path: /tmp/trailing_space_offenders.txt | |
| run: | | |
| grep -rIlE --exclude-dir=.git '[[:blank:]]+$' . > "$offenders_path" || true | |
| if [ -s "$offenders_path" ]; then | |
| cat "$offenders_path" | |
| exit 1 | |
| fi |