Skip to content

Commit

Permalink
Change renovatebot rules to update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Reis committed Jun 5, 2023
1 parent 565a252 commit 22fa194
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 23 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: golangci-lint
on:
push:
tags:
- v*
- v*
branches:
- master
- main
- master
- main
pull_request:
branches:
- master
- main
- master
- main
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
Expand All @@ -19,12 +19,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 3m
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout 3m
11 changes: 4 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
linters:
disable-all: true
enable:
#- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
# - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- gosimple # Linter for Go source code that specializes in simplifying a code
#- exhaustive # check exhaustiveness of enum switch statements
#- funlen # Tool for detection of long functions
#- gocognit # Computes and checks the cognitive complexity of functions
Expand All @@ -14,26 +16,21 @@ linters:
#- scopelint # Scopelint checks for unpinned variables in go programs
#- unused # Checks Go code for unused constants, variables, functions and types
#- whitespace # Tool for detection of leading and trailing whitespace
# - depguard # Go linter that checks if package imports are in a list of acceptable packages
- bodyclose # checks whether HTTP response body is closed successfully
- deadcode # Finds unused code
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- dupl # Tool for code clone detection
- exportloopref # checks for pointers to enclosing loop variables
- goconst # Finds repeated strings that could be replaced by a constant
- gocyclo # Computes and checks the cyclomatic complexity of functions
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
- gosimple # Linter for Go source code that specializes in simplifying a code
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
- nakedret # Finds naked returns in functions greater than a specified function length
- noctx # noctx finds sending http request without context.Context
- prealloc # Finds slice declarations that could potentially be preallocated
- rowserrcheck # checks whether Err of rows is checked successfully
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
- structcheck # Finds unused struct fields
- stylecheck # Stylecheck is a replacement for golint
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
- unconvert # Remove unnecessary type conversions
- unparam # Reports unused function parameters
- varcheck # Finds unused global variables and constants
28 changes: 26 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
{
"onboarding": true,
"onboardingConfig": {
"extends": [
"config:base", ":semanticCommits"
]
},
"extends": [
"config:base"
"config:base",
":semanticCommits"
],
"postUpdateOptions": [
"gomodTidy"
"gomodTidy", "gomodUpdateImportPaths"
],
"packageRules": [
{
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"matchPackagePatterns": [
"*"
],
"matchUpdateTypes": [
"minor",
"patch",
"digest"
],
"schedule": [
"before 8am on Monday"
]
}
]
}

0 comments on commit 22fa194

Please sign in to comment.