-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't run unused when targeting feature branches. (#3819)
don't run unused when targeting feature branches.
- Loading branch information
1 parent
5e4af4c
commit 3092171
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# golangci-feature runs on pull requests from branches that do not target main. | ||
# | ||
# Working on feature branches (PRs where the PR base-ref != main) is a common | ||
# workflow used, in order to make the merging of PRs easier certain lints are excluded | ||
# when it makes sense. Currently, unused lints are excluded since many PRs will add | ||
# unused code that will be used in a later PR. | ||
name: golangci-lint feature branch | ||
on: | ||
pull_request: | ||
# Ignore if the target is main. (Negation of golanci-lint.yml) | ||
branches-ignore: | ||
- main | ||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3.4.0 | ||
with: | ||
version: v1.52.0 | ||
args: --timeout 5m --exclude unused |
This file contains 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