Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
add golangci-lint.yml file
Browse files Browse the repository at this point in the history
Signed-off-by: Musilah <[email protected]>
  • Loading branch information
Musilah committed Nov 21, 2023
1 parent 5751283 commit dd1d55c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
key: ${{ runner.os }}-codecov-${{ hashFiles('./codecov') }}
restore-keys: |
${{ runner.os }}-codecov-
- name: Cache Golangci-lint
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -154,11 +154,6 @@ jobs:
key: ${{ runner.os }}-codecov-${{ hashFiles('**/go.sum') }}
id: restore-codecov

- name: Lint Users
run: |
cd users
./bin/golangci-lint run
- name: Test Users
run: |
cd users
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0

name: golangci-lint
on:
push:
branches:
- master
- main
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:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.54
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ issues:
max-issues-per-linter: 10
max-same-issues: 10

exclude:
- "string `Usage:\n` has (\\d+) occurrences, make it a constant"
- "string `For example:\n` has (\\d+) occurrences, make it a constant"

linters-settings:
gocritic:
enabled-checks:
Expand Down

0 comments on commit dd1d55c

Please sign in to comment.