Skip to content

Commit

Permalink
Repo maintance:
Browse files Browse the repository at this point in the history
- clean up dependencies
- adding golangci lint
- updating maintaining teams
- allow release/** to build newer versions of consul-template going forward
  • Loading branch information
roncodingenthusiast committed Aug 11, 2023
1 parent f00bbcf commit 24e8f2e
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 8 deletions.
61 changes: 61 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

linters:
disable-all: true
enable:
- gofmt
- govet
- unconvert
- staticcheck
- ineffassign
- unparam
- forbidigo
- gomodguard
- depguard
- gosimple

issues:
# Disable the default exclude list so that all excludes are explicitly
# defined in this file.
exclude-use-default: false

linters-settings:
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
- nilness
- shadow
- unusedwrite
gofmt:
simplify: true
forbidigo:
# Forbid the following identifiers (list of regexp).
forbid:
- '\bioutil\b(# Use io and os packages instead of ioutil)?'
- '\brequire\.New\b(# Use package-level functions with explicit TestingT)?'
- '\bassert\.New\b(# Use package-level functions with explicit TestingT)?'
# Exclude godoc examples from forbidigo checks.
# Default: true
exclude_godoc_examples: false
gomodguard:
blocked:
# List of blocked modules.
modules:
# Blocked module.
- github.com/hashicorp/go-msgpack:
recommendations:
- github.com/hashicorp/consul-net-rpc/go-msgpack
- github.com/golang/protobuf:
recommendations:
- google.golang.org/protobuf
depguard:
list-type: denylist
include-go-root: true

run:
timeout: 10m
concurrency: 4
skip-dirs-use-default: false
9 changes: 6 additions & 3 deletions .release/ci.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ schema = "1"

project "consul-template" {
// the team key is not used by CRT currently
team = "cat-floss"
team = "consul-core"
slack {
notification_channel = "C026W707YHJ"
notification_channel = "C9KPKPKRN"
}
github {
organization = "hashicorp"
repository = "consul-template"
release_branches = ["main"]
release_branches = [
"main",
"release/**",
]
}
}

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ARG PRODUCT_NAME=$BIN_NAME
# TARGETARCH and TARGETOS are set automatically when --platform is provided.
ARG TARGETOS TARGETARCH

LABEL maintainer="John Eikenberry <jae@zhar.net>"
LABEL maintainer="Consul Team <consul@hashicorp.com>"
# version label is required for build process
LABEL version=$PRODUCT_VERSION
LABEL revision=$PRODUCT_REVISION
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ toc:
dev-tree:
@true
.PHONY: dev-tree

# lint
lint:
@echo "==> Running golangci-lint"
GOWORK=off golangci-lint run --build-tags '$(GOTAGS)'
.PHONY: lint
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,3 @@ require (
golang.org/x/time v0.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/golang/lint => golang.org/x/lint v0.0.0-20190409202823-959b441ac422

replace sourcegraph.com/sourcegraph/go-diff => github.com/sourcegraph/go-diff v0.5.1

0 comments on commit 24e8f2e

Please sign in to comment.