Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,31 @@ name: Lint
on:
pull_request:
branches:
- main
- '**'
push:
branches:
- main

# Only one lint job runs per branch. New commits cancel old lint jobs.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this per branch or per PR? It looks like it's per reference which is basically tied to the pull request?

Copy link
Collaborator Author

@SoluMilken SoluMilken Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow + branch or pr

For pushes to a branch:
It will be in the format refs/heads/<branch_name>, for example, refs/heads/main or refs/heads/feature-branch.
For pushes of a tag:
It will be in the format refs/tags/<tag_name>, for example, refs/tags/v1.0.0.
For pull requests:
It will be the pull request merge branch, typically in the format refs/pull/<pr_number>/merge. This represents the state of the code after the pull request has been merged into the target branch.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best to update the comments so we're clear on this.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: clang-format --version
- run: ./lint.sh ${{ github.workspace }}
- run: echo "Job's status ${{ job.status }}."
- name: Fetch Code
uses: actions/checkout@v4

- name: Ensure clang-format Installed
run: |
if ! command -v clang-format &> /dev/null; then
apt-get update
apt-get install -y clang-format
fi
echo "clang-format version = $(clang-format --version)"

- name: Run Linter
run: |
./lint.sh ${{ github.workspace }}