Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linters: use golangci-lint GitHub action instead of a manual setup #1556

Merged
Merged
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
18 changes: 8 additions & 10 deletions .github/workflows/pre-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

# TODO: golangci-lint team recommends using a GitHub Action to perform golangci-lint responsibilities. However
# there does not appear to be a way to honor our existing .golangci.yml. For now, mimic developer behavior.
- name: Install golangci-lint
run: make install-lint

- name: Install checkmake
run: |
curl --location --output $CM_BIN --silent $CM_URL_LINUX
Expand All @@ -69,6 +64,12 @@ jobs:
- name: Install Shfmt
uses: mfinelli/setup-shfmt@v3

- name: Golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
args: --timeout 10m0s

- name: Checkmake
Copy link
Contributor

Choose a reason for hiding this comment

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

How about the name "Run Checkmake"?

run: checkmake --config=.checkmake Makefile

Expand All @@ -81,7 +82,7 @@ jobs:
- name: Shfmt
run: shfmt -d *.sh script

- name: markdownlint
- name: Markdownlint
Copy link
Contributor

Choose a reason for hiding this comment

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

Run Markdown Linter?

uses: nosborn/[email protected]
with:
files: .
Expand All @@ -97,10 +98,7 @@ jobs:
with:
config_file: .yamllint.yml

- name: Golangci-lint
run: golangci-lint run --timeout 10m0s

- name: make vet
- name: Go vet
run: make vet
unit-tests:
name: Run Unit Tests
Expand Down