Skip to content

Commit

Permalink
Replace deprecated golangci linters and update pipeline descriptor
Browse files Browse the repository at this point in the history
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
  • Loading branch information
sambhav committed Jul 1, 2021
1 parent 6ed2703 commit 66f6023
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 24 deletions.
19 changes: 19 additions & 0 deletions .github/pipeline-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,22 @@ github:
codeowners:
- path: "*"
owner: "@buildpacks/implementation-maintainers"

test:
steps:
- name: Install richgo
run: |
#!/usr/bin/env bash
set -euo pipefail
GO111MODULE=on go get -u -ldflags="-s -w" github.com/kyoh86/richgo
- name: Run Tests
run: |
#!/usr/bin/env bash
set -euo pipefail
GOCMD=richgo make
env:
RICHGO_FORCE_COLOR: "1"
3 changes: 0 additions & 3 deletions .github/pipelines-descriptor.yml

This file was deleted.

14 changes: 1 addition & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,7 @@ jobs:
set -euo pipefail
echo "Installing richgo ${RICHGO_VERSION}"
mkdir -p "${HOME}"/bin
echo "${HOME}/bin" >> "${GITHUB_PATH}"
curl \
--location \
--show-error \
--silent \
"https://github.com/kyoh86/richgo/releases/download/v${RICHGO_VERSION}/richgo_${RICHGO_VERSION}_linux_amd64.tar.gz" \
| tar -C "${HOME}"/bin -xz richgo
env:
RICHGO_VERSION: 0.3.6
GO111MODULE=on go get -u -ldflags="-s -w" github.com/kyoh86/richgo
- name: Run Tests
run: |
#!/usr/bin/env bash
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ lint: install-golangci-lint
@golangci-lint run -c golangci.yaml

test: format lint
$(GOCMD) test -parallel=1 -count=1 -v ./...
$(GOCMD) test -parallel=1 -count=1 -v ./...
7 changes: 3 additions & 4 deletions golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ linters:
- bodyclose
- deadcode
- dogsled
- exportloopref
- gocritic
- goimports
- golint
- gosec
- gosimple
- govet
- ineffassign
- maligned
- misspell
- nakedret
- scopelint
- revive
- staticcheck
- structcheck
- stylecheck
Expand All @@ -29,4 +28,4 @@ linters:

linters-settings:
goimports:
local-prefixes: github.com/buildpacks/libcnb
local-prefixes: github.com/buildpacks/libcnb
1 change: 1 addition & 0 deletions layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"path/filepath"

"github.com/BurntSushi/toml"

"github.com/buildpacks/libcnb/internal"
)

Expand Down
3 changes: 2 additions & 1 deletion mocks/builder.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mocks/detector.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion mocks/layer_contributor.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66f6023

Please sign in to comment.