1
0
Fork
You've already forked nice
0

Add golangci-lint to GitHub Actions #1

Merged
antonyho merged 2 commits from ci-linter into master 2025年06月08日 21:13:39 +02:00
antonyho commented 2025年06月08日 20:57:11 +02:00 (Migrated from github.com)
Copy link
No description provided.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025年06月08日 20:58:47 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment
Copy link

Pull Request Overview

Adds a new GitHub Actions workflow to run golangci-lint on pushes to master and on pull requests.

  • Introduces .github/workflows/golangci-lint.yml to automate lint checks.
  • Configures permissions and sets up Go and the golangci-lint action.
## Pull Request Overview Adds a new GitHub Actions workflow to run golangci-lint on pushes to master and on pull requests. - Introduces `.github/workflows/golangci-lint.yml` to automate lint checks. - Configures permissions and sets up Go and the golangci-lint action.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025年06月08日 20:58:46 +02:00
Copy link

Pin the Go version to a specific release (e.g. 1.21) instead of stable for reproducible CI runs and to avoid unexpected changes when the latest Go version updates.

 go-version: 1.21
Pin the Go version to a specific release (e.g. `1.21`) instead of `stable` for reproducible CI runs and to avoid unexpected changes when the latest Go version updates. ```suggestion go-version: 1.21 ```
@ -0,0 +1,25 @@
name:golangci-lint
on:
push:
branches:
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025年06月08日 20:58:46 +02:00
Copy link

The trigger is set to run on commits to master, but the default branch appears to be main. Update the branch filter to main (or both main and master) to ensure the workflow actually runs.

 branches:
 - main
The trigger is set to run on commits to `master`, but the default branch appears to be `main`. Update the branch filter to `main` (or both `main` and `master`) to ensure the workflow actually runs. ```suggestion branches: - main ```
@ -0,0 +22,4 @@
- name:golangci-lint
uses:golangci/golangci-lint-action@v8
with:
version:v2.1
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025年06月08日 20:58:47 +02:00
Copy link

Consider enabling or configuring caching for Go modules (using cache: true or similar inputs) to speed up lint runs and reduce network overhead.

 version: v2.1
 cache: true
Consider enabling or configuring caching for Go modules (using `cache: true` or similar inputs) to speed up lint runs and reduce network overhead. ```suggestion version: v2.1 cache: true ```
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
antonyho/nice!1
Reference in a new issue
antonyho/nice
No description provided.
Delete branch "ci-linter"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?