Skip to content

Commit

Permalink
fix(stencil): upgrade modules (2025-01-14) (#142)
Browse files Browse the repository at this point in the history
* Fix lint errors

---------

Co-authored-by: getoutreach-ci-1[bot] <95656460+getoutreach-ci-1[bot]@users.noreply.github.com>
Co-authored-by: Mark Lee <[email protected]>
  • Loading branch information
getoutreach-ci-1[bot] and malept authored Jan 14, 2025
1 parent b8668a4 commit c7f933a
Show file tree
Hide file tree
Showing 14 changed files with 778 additions and 687 deletions.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# syntax, such as anchors, will be fixed automatically.
version: 2.1
orbs:
shared: getoutreach/shared@dev:2.28.2-rc.2
shared: getoutreach/shared@dev:2.29.0-rc.8
queue: eddiewebb/[email protected]
## <<Stencil::Block(CircleCIExtraOrbs)>>

Expand All @@ -22,6 +22,7 @@ contexts: &contexts
- ghaccesstoken
- docker-registry
- npm-credentials
- box
- vault-dev
- confluence
- circleci-credentials
Expand All @@ -45,6 +46,10 @@ test: &test
release_branches: &release_branches
- "main"

## <<Stencil::Block(circleAnchorExtra)>>

## <</Stencil::Block>>

jobs:
{}
## <<Stencil::Block(circleJobs)>>
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ updates:
ignore:
- dependency-name: github.com/getoutreach/gobox
- dependency-name: github.com/getoutreach/stencil-golang/pkg
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/services
- dependency-name: github.com/getoutreach/datastores/v2
- dependency-name: github.com/getoutreach/mint
- dependency-name: github.com/getoutreach/httpx

# Ignore semantic-release, this code is only executed in CI.
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# you are reducing compatibility guarantees.
## <<Stencil::Block(toolverOverride)>>
## <</Stencil::Block>>
golang 1.22.6
protoc 21.5
nodejs 20.16.0
terraform 1.5.7
golang 1.23.4
# Note: Versions in this block do not override the default versions above
# but sometimes you have to declare additional versions of the same tool
# while leaving the 'default' version intact for the infra.
Expand Down
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
// Maps the go module cache on the host to the persistent volume used by devspaces.
// These should be the respective values of `go env GOMODCACHE`.
{
"from": "${env:HOME}/.asdf/installs/golang/1.22.6/packages/pkg/mod",
"to": "/home/dev/.asdf/installs/golang/1.22.6/packages/pkg/mod"
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/packages/pkg/mod",
"to": "/home/dev/.asdf/installs/golang/1.23.4/packages/pkg/mod"
},
{
// Maps the standard library location on the host to the location in the devspace.
// This enables debugging standard library code.
"from": "${env:HOME}/.asdf/installs/golang/1.22.6/go/src",
"to": "/home/dev/.asdf/installs/golang/1.22.6/go/src"
"from": "${env:HOME}/.asdf/installs/golang/1.23.4/go/src",
"to": "/home/dev/.asdf/installs/golang/1.23.4/go/src"
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"go.alternateTools": {
"golangci-lint": "${workspaceFolder}/.bootstrap/shell/vscode/golang-linters.sh"
},
// This is disabled because it causes version mismatches between the
// tools used/installed by asdf / stencil, and the ones updated by VSCode.
// In particular, this is a problem with newer versions of golangci-lint
// incompatible with older versions of Go.
"go.toolsManagement.autoUpdate": false,
"go.buildTags": "or_dev",
"go.testTags": "or_test,or_int,or_e2e",
"files.trimTrailingWhitespace": true,
Expand Down
4 changes: 2 additions & 2 deletions cortex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ info:
repo: https://github.com/getoutreach/lintroller
framework: stencil
language: Golang
stencil_version: v1.40.0-rc.1
golang_version: 1.22.6
stencil_version: v1.40.1-rc.2
golang_version: 1.23.4
cli: false
service: false
product: Outreach
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/getoutreach/lintroller

go 1.22
go 1.23.0

toolchain go1.22.6
toolchain go1.23.4

require (
github.com/getoutreach/gobox v1.90.2
github.com/getoutreach/gobox v1.102.1
github.com/pkg/errors v0.9.1
golang.org/x/tools v0.24.0
gopkg.in/yaml.v3 v3.0.1
Expand All @@ -20,6 +20,6 @@ require (
require (
github.com/google/go-cmp v0.6.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sync v0.10.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
8 changes: 4 additions & 4 deletions go.sum

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

3 changes: 0 additions & 3 deletions internal/doculint/doculint.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ func doculint(_pass *analysis.Pass) (interface{}, error) { //nolint:funlen // Wh
allGenerated := true

for _, file := range pass.Files {
// Pull file into a local variable so it can be passed as a parameter safely.
file := file

// Ignore generated files and test files.
if common.IsGenerated(file) || common.IsTestFile(pass.Pass, file) {
continue
Expand Down
2 changes: 1 addition & 1 deletion internal/header/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func header(pass *analysis.Pass) (interface{}, error) { //nolint:funlen // Why:
prefix := fmt.Sprintf("%s: ", fields[i])

if strings.HasPrefix(cleanComment, prefix) {
if len(strings.TrimPrefix(cleanComment, prefix)) > 0 {
if strings.TrimPrefix(cleanComment, prefix) != "" {
// If the current comment line has a field prefix we're looking for and
// data proceeding the colon and space after the colon, we will mark the
// field as valid.
Expand Down
2 changes: 1 addition & 1 deletion scripts/devbase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
libDir="$DIR/../.bootstrap"
lockfile="$DIR/../stencil.lock"
serviceYaml="$DIR/../service.yaml"
gojqVersion="v0.12.14"
gojqVersion="v0.12.16"

# get_absolute_path returns the absolute path of a file
get_absolute_path() {
Expand Down
14 changes: 7 additions & 7 deletions scripts/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ linters-settings:
errcheck:
check-blank: true
govet:
check-shadowing: true
enable:
- shadow
revive:
rules:
# Enable the default golint rules. We must include these because
Expand Down Expand Up @@ -56,10 +57,6 @@ linters-settings:
- style
disabled-checks:
- whyNoLint # Doesn't seem to work properly
# Suggests bad simplifications (After is not identical to !Before).
# TODO(jkinkead): Remove when we have a version of go-critic with
# https://github.com/go-critic/go-critic/pull/1281 merged.
- timeCmpSimplify
funlen:
lines: 500
statements: 50
Expand All @@ -69,11 +66,11 @@ linters:
disable-all: true
enable:
- bodyclose
- copyloopvar # Detects places where loop variables are copied.
- dogsled
- errcheck
- errorlint
- exhaustive # Checks exhaustiveness of enum switch statements.
- exportloopref # Checks for pointers to enclosing loop variables.
- funlen
- gochecknoinits
- goconst
Expand All @@ -97,6 +94,7 @@ linters:
- whitespace

issues:
max-same-issues: 10
exclude:
# We allow error shadowing
- 'declaration of "err" shadows declaration at'
Expand Down Expand Up @@ -126,6 +124,8 @@ issues:
source: "^//go:generate "

output:
format: colored-line-number
formats:
- format: colored-line-number
path: stdout
sort-results: true
print-severity: true
18 changes: 9 additions & 9 deletions stencil.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
version: v1.40.0-rc.1
version: v1.40.1-rc.2
modules:
- name: github.com/getoutreach/devbase
url: https://github.com/getoutreach/devbase
version: v2.28.2-rc.2
version: v2.29.0-rc.8
- name: github.com/getoutreach/stencil-actions
url: https://github.com/getoutreach/stencil-actions
version: v0.4.3-rc.3
version: v0.4.4-rc.1
- name: github.com/getoutreach/stencil-base
url: https://github.com/getoutreach/stencil-base
version: v0.16.2-rc.1
version: v0.16.3-rc.1
- name: github.com/getoutreach/stencil-circleci
url: https://github.com/getoutreach/stencil-circleci
version: v1.14.0
version: v1.15.0-rc.1
- name: github.com/getoutreach/stencil-discovery
url: https://github.com/getoutreach/stencil-discovery
version: v1.8.6-rc.1
version: v1.8.7-rc.1
- name: github.com/getoutreach/stencil-golang
url: https://github.com/getoutreach/stencil-golang
version: v1.24.1-rc.2
version: v1.25.0-rc.10
- name: github.com/getoutreach/stencil-outreach
url: https://github.com/getoutreach/stencil-outreach
version: v0.23.0-rc.1
version: v0.24.0-rc.4
- name: github.com/getoutreach/stencil-pipeline
url: https://github.com/getoutreach/stencil-pipeline
version: v1.2.3-rc.1
version: v1.2.4-rc.1
files:
- name: .circleci/config.yml
template: .circleci/config.yml.tpl
Expand Down
Loading

0 comments on commit c7f933a

Please sign in to comment.