-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to configure all levels at once with the 'all' scope (#5)
- Loading branch information
Showing
13 changed files
with
180 additions
and
83 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2021 Tetrate Labs | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
GOPROXY: https://proxy.golang.org | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- run: make build | ||
- run: make test | ||
- run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
vendor | ||
.idea | ||
.vscode | ||
|
||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
# Packages to build | ||
PKGS := $(shell go list -f '{{if .GoFiles}}{{.ImportPath}}{{end}}' ./...) | ||
# Tests to run | ||
TESTS := $(shell go list -f '{{if .TestGoFiles}}{{.ImportPath}}{{end}}' ./...) | ||
|
||
# Enable go modules when building, even if the repo is copied into a GOPATH. | ||
export GO111MODULE=on | ||
PKGS := ./... | ||
TEST_OPTS ?= | ||
|
||
build: | ||
@echo "--- build ---" | ||
@go build -v $(PKGS) | ||
@go vet $(PKGS) | ||
go build -v $(PKGS) | ||
|
||
test: | ||
@echo "--- test ---" | ||
@go test $(TESTS) | ||
go test $(TEST_OPTS) $(PKGS) | ||
|
||
LINTER := bin/golangci-lint | ||
$(LINTER): | ||
@curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.11.2 | ||
wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b bin v1.23.6 | ||
|
||
lint: $(LINTER) ./bin/.golangci.yml | ||
lint: $(LINTER) golangci.yml | ||
@echo "--- lint ---" | ||
@$(LINTER) run --config ./bin/.golangci.yml | ||
$(LINTER) run --config golangci.yml | ||
|
||
.PHONY: build test lint |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
linters: | ||
enable: | ||
- deadcode | ||
- errcheck | ||
- goconst | ||
- golint | ||
- ineffassign | ||
- lll | ||
- maligned | ||
- misspell | ||
- structcheck | ||
- unconvert | ||
- varcheck | ||
- govet | ||
- goimports | ||
- prealloc | ||
- unused | ||
- staticcheck | ||
- gosimple | ||
- megacheck | ||
disable: | ||
- interfacer | ||
linters-settings: | ||
lll: | ||
line-length: 170 | ||
goconst: | ||
min-occurrences: 4 | ||
govet: | ||
check-shadowing: true | ||
run: | ||
deadline: 10m | ||
skip-dirs: | ||
- k8s/istioapis/generated | ||
- k8s/tsbapis/generated | ||
issues: | ||
exclude: | ||
# staticcheck | ||
- 'SA1019: Package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead.' | ||
- 'SA1019: Package github.com/golang/protobuf/jsonpb is deprecated: Use the "google.golang.org/protobuf/encoding/protojson" package instead.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters