Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Enable Dependabot to ensure that the dependencies will be updated on a monthly basis #1

Merged
merged 9 commits into from
Oct 21, 2024
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
23 changes: 23 additions & 0 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Golang
"on":
# required by gomod-go-version-updater to trigger this action once pr has
# been reviewed
pull_request_review:
types: [submitted]
push:
permissions:
contents: read
packages: read
jobs:
mcvs-golang-action:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: schubergphilis/[email protected]
with:
code_coverage_expected: 62.3
gci: "false"
golang-unit-tests-exclusions: |-
\(cmd\/prolayout\)
golangci-lint-version: v1.61.0
14 changes: 14 additions & 0 deletions .github/workflows/gomod-go-version-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: gomod-go-version-updater-action
"on":
schedule:
- cron: "42 5 * * 1-5"
permissions:
contents: write
pull-requests: write
repository-projects: write
jobs:
gomod-go-version-updater-action:
runs-on: ubuntu-22.04
steps:
- uses: schubergphilis/[email protected]
19 changes: 19 additions & 0 deletions .github/workflows/mcvs-pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: MCVS-PR-validation-action
"on":
pull_request:
types:
- edited
- opened
- reopened
- synchronize
workflow_call:
permissions:
contents: read
pull-requests: read
jobs:
MCVS-PR-validation-action:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- uses: schubergphilis/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
reports
102 changes: 23 additions & 79 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
---
run:
concurrency: 3
timeout: 15m
issues-exit-code: 1
tests: true

skip-dirs:
- data

# list of build tags, all linters use it. Default is empty list

# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: code-climate

# print lines of code with issue, default is true
print-issued-lines: true

# print linter name in the end of issue text, default is true
print-linter-name: true

uniq-by-line: false

# all available settings of specific linters
Expand All @@ -30,12 +22,14 @@ linters-settings:
deny:
- pkg: "github.com/tj/assert"
desc: not allowed, did you mean testify assert?
gci:
local-prefixes: github.com/wimspaargaren/prolayout

errcheck:
check-type-assertions: false
check-foonk: true

gci:
sections:
- standard # Standard section: captures all standard packages.
- default
- prefix(github.com/wimspaargaren/prolayout)
revive:
ignore-generated-header: true
enable-all-rules: true
Expand Down Expand Up @@ -79,18 +73,10 @@ linters-settings:
disabled: false
arguments:
- "^[a-z][a-z0-9A-Z]{0,}$"
govet:
check-shadowing: false

golint:
min-confidence: 0.8

gofmt:
simplify: true
gocyclo:
min-complexity: 18
maligned:
suggest-new: true
dupl:
threshold: 175
goconst:
Expand All @@ -114,84 +100,42 @@ linters-settings:
lll:
line-length: 200
tab-width: 2
unused:
check-exported: false

unparam:
check-exported: false

nakedret:
max-func-lines: 0
prealloc:
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
range-loops: true
for-loops: false
gocritic:
disabled-checks:
- regexpMust

enabled-tags:
- performance

settings: # settings passed to gocritic
captLocal: # must be valid enabled check name
paramsOnly: true
rangeValCopy:
sizeThreshold: 32

linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- dupl
- errcheck
- errorlint
- exhaustive
- exportloopref
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- gofumpt
- goheader
- revive
- gomodguard
- goprintffuncname
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- rowserrcheck
- sqlclosecheck
- staticcheck
- tparallel
- typecheck
- unconvert
- unparam
- whitespace
- dogsled
- godot
- goerr113
- goimports
- lll
- prealloc
- testpackage
- depguard

enable-all: true
disable:
- errname
- execinquery # deprecated (since v1.58.0)
- exhaustruct
- exportloopref # deprecated (since v1.60.2)
- gomnd # deprecated (since v1.58.0)
- nilnil
- nlreturn
- paralleltest
- varnamelen
- wsl

fast: false

severity:
severity:
default-severity: error
rules:
- linters:
Expand Down
4 changes: 1 addition & 3 deletions .prolayout.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
module: "github.com/wimspaargaren/prolayout"
root:
- name: "bar"



Loading