Skip to content

Commit

Permalink
fix(ci): add lint and lint-sync workflows and update golangci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 24, 2024
1 parent 6f3d765 commit 120b3f8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 70 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/lint-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: lint-sync
on:
schedule:
# every Sunday at midnight
- cron: "0 0 * * 0"
workflow_dispatch: # allows manual triggering

permissions:
contents: write
pull-requests: write

jobs:
lint:
uses: charmbracelet/meta/.github/workflows/lint-sync.yml@main
24 changes: 2 additions & 22 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@ on:
push:
pull_request:

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:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ^1.18

- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: golangci-lint command line arguments.
#args:
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
lint:
uses: charmbracelet/meta/.github/workflows/lint.yml@main
44 changes: 0 additions & 44 deletions .golangci-soft.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ issues:
linters:
enable:
- bodyclose
- copyloopvar
- gofumpt
- goimports
- gosec
Expand All @@ -27,6 +26,3 @@ linters:
- unconvert
- unparam
- whitespace
# We're disabling predeclared because the linter is running a newer version
# of Go than then Go module.
# - predeclared

0 comments on commit 120b3f8

Please sign in to comment.