diff --git a/.github/workflows/test-git.yml b/.github/workflows/test-git.yml index a534ccb..68b67f4 100644 --- a/.github/workflows/test-git.yml +++ b/.github/workflows/test-git.yml @@ -15,7 +15,7 @@ jobs: name: Build and test go-alpm runs-on: ubuntu-latest container: - image: jguer/goalpm-builder:latest + image: jguer/yay-builder:latest steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e2764e..485114f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,22 +15,11 @@ jobs: name: Build and test go-alpm runs-on: ubuntu-latest container: - image: jguer/goalpm-builder:latest + image: jguer/yay-builder:latest steps: - name: Checkout uses: actions/checkout@v2 - name: Lint run: /app/bin/golangci-lint run ./... - name: Run Build and Tests - run: make test - - name: Build and install pacman-git - run: | - useradd github - pacman -Sy --noconfirm --needed sudo base-devel git - echo "github ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - git clone https://aur.archlinux.org/pacman-git - chown -R github pacman-git - su github -c "cd pacman-git; yes | makepkg -si --nocheck" - - name: Run Build and Tests with pacman-git - run: make test - + run: make test \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 3a389ed..bf61c3d 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,42 +14,52 @@ linters-settings: - opinionated - performance - style - disabled-checks: - - dupImport gocyclo: min-complexity: 15 goimports: - local-prefixes: github.com/Jguer/go-alpm/v2 + local-prefixes: github.com/Jguer/yay/v12 gomnd: - settings: - mnd: - # don't include the "operation" and "assign" - checks: argument,case,condition,return - govet: - check-shadowing: true + checks: + - argument + - case + - condition + - return + ignored-numbers: + - "0" + - "1" + - "2" + - "3" + ignored-functions: + - strings.SplitN lll: line-length: 140 - maligned: - suggest-new: true misspell: locale: US + nolintlint: + allow-unused: false # report any unused nolint directives + require-explanation: false # don't require an explanation for nolint directives + require-specific: false # don't require nolint directives to be specific about which linter is being skipped linters: # please, do not use `enable-all`: it's deprecated and will be removed soon. # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint disable-all: true enable: + - forbidigo - bodyclose - - depguard - dogsled - dupl - - errcheck - errorlint + - errcheck - exportloopref + # - funlen # TOFIX - gochecknoinits + # - goconst # TOFIX - gocritic + # - gocyclo # TOFIX - gofmt - goimports + # - gomnd # TOFIX - goprintffuncname - gosec - gosimple @@ -69,10 +79,12 @@ linters: - whitespace run: + go: "1.22" + timeout: "10m" issues: exclude-rules: - - path: _test\.go + - path: (.+)_test.go linters: - lll - revive @@ -84,6 +96,7 @@ issues: - dupl - gocritic - gochecknoinits + - errorlint exclude: - G204