You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Linter Action documentation at https://github.com/marketplace/actions/lint-action
4
+
5
+
# One thing to note is that this action is currently configured automatically fix and re-push the linted code to the repo on a pull request.
6
+
# Because the github token used for authenticating this commit comes from the upstream repo (ie scitokens/scitokens-cpp), those linter changes will not be pushed
7
+
# to the fork that is providing the pull request. A manual git fetch will have to be run by the fork after the PR is merged to update the fork to the linted code.
8
+
# The linter does not have authorization to lint any code in the repo's .github/workflows/ directory.
9
+
10
+
# If the linter fails, the PR can still be completed, but none of the linter changes will be made.
11
+
12
+
on:
13
+
# push: # Can specify more circumstances under which to run the linter.
14
+
# branches: # Not specifying input to "branches:" causes the action to run on push for all branches.
15
+
16
+
# Trigger the workflow on pull request,
17
+
# but only for master
18
+
pull_request:
19
+
branches:
20
+
- master
21
+
22
+
jobs:
23
+
run-linters:
24
+
name: Run linters
25
+
runs-on: ubuntu-latest
26
+
27
+
steps:
28
+
- name: Check out Git repository
29
+
uses: actions/checkout@v2
30
+
31
+
- name: Install ClangFormat
32
+
run: sudo apt-get install -y clang-format
33
+
34
+
- name: Run linters
35
+
uses: wearerequired/lint-action@v2
36
+
with:
37
+
github_token: ${{ secrets.github_token }} # For providing the commit authorization for the auto_fix feature
38
+
clang_format: true
39
+
clang_format_auto_fix: true
40
+
auto_fix: true
41
+
commit: true
42
+
continue_on_error: false
43
+
git_email: github.event.commits[0].author.name # Uses the author's git email instead of the default git email associated with the action ("lint-action@samuelmeuli.com")
44
+
clang_format_args: -style=file # Any additional arguments for clang_format
0 commit comments