Skip to content

Commit

Permalink
Update to go1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed May 24, 2024
1 parent a531f26 commit 3be4a47
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 33 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.0
version: latest
args: "-v --new-from-rev HEAD~5"
test-build-upload:
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -38,19 +38,19 @@ jobs:
GOOS=windows GOARCH=amd64 go build -mod=vendor -ldflags "-s -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o output/win/matterircd-$VERSION-windows-amd64.exe
GOOS=darwin GOARCH=amd64 go build -mod=vendor -ldflags "-s -X main.githash=$(git log --pretty=format:'%h' -n 1)" -o output/mac/matterircd-$VERSION-darwin-amd64
- name: Upload linux 64-bit
if: startsWith(matrix.go-version,'1.21')
if: startsWith(matrix.go-version,'1.22')
uses: actions/upload-artifact@v3
with:
name: matterircd-linux-64bit
path: output/lin
- name: Upload windows 64-bit
if: startsWith(matrix.go-version,'1.21')
if: startsWith(matrix.go-version,'1.22')
uses: actions/upload-artifact@v3
with:
name: matterircd-windows-64bit
path: output/win
- name: Upload darwin 64-bit
if: startsWith(matrix.go-version,'1.21')
if: startsWith(matrix.go-version,'1.22')
uses: actions/upload-artifact@v3
with:
name: matterircd-darwin-64bit
Expand Down
31 changes: 4 additions & 27 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ run:
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs: gateway/bridgemap$
issues.exclude-dirs: gateway/bridgemap$

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
Expand All @@ -35,7 +35,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true
Expand All @@ -55,9 +55,6 @@ linters-settings:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: false
govet:
# report about shadowed variables
check-shadowing: true
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
Expand Down Expand Up @@ -130,39 +127,17 @@ linters-settings:
# all checks list: https://github.com/go-critic/checkers
# disabled for now - hugeParam
enabled-checks:
- appendAssign
- assignOp
- boolExprSimplify
- builtinShadow
- captLocal
- caseOrder
- commentedOutImport
- defaultCaseOrder
- dupArg
- dupBranchBody
- dupCase
- dupSubExpr
- elseif
- emptyFallthrough
- ifElseChain
- importShadow
- indexAlloc
- methodExprCall
- nestingReduce
- offBy1
- ptrToRefParam
- regexpMust
- singleCaseSwitch
- sloppyLen
- switchTrue
- typeSwitchVar
- typeUnparen
- underef
- unlambda
- unnecessaryBlock
- unslice
- valSwap
- wrapperFunc
- yodaStyleExpr


Expand Down Expand Up @@ -223,6 +198,8 @@ linters:
- gosmopolitan
- zerologlint
- tagalign
- mnd
- perfsprint

# rules to deal with reported isues
issues:
Expand Down
2 changes: 1 addition & 1 deletion mm-go-irckit/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func scrollback(u *User, toUser *User, args []string, service string) {
}
}

if !u.v.GetBool(u.br.Protocol() + ".collapsescrollback") { //nolint:goconst
if !u.v.GetBool(u.br.Protocol() + ".collapsescrollback") {
u.MsgUser(toUser, fmt.Sprintf("scrollback results shown in %s", search))
}
}
Expand Down

0 comments on commit 3be4a47

Please sign in to comment.