Skip to content

Commit

Permalink
chore: add initial code
Browse files Browse the repository at this point in the history
Add initial code.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Mar 6, 2024
1 parent 52a6d48 commit aa4ade4
Show file tree
Hide file tree
Showing 16 changed files with 780 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .codecov.yml
@@ -0,0 +1,18 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:14:30Z by kres 5724eac-dirty.

codecov:
require_ci_to_pass: false

coverage:
status:
project:
default:
target: 50%
threshold: 0.5%
base: auto
if_ci_failed: success
patch: off

comment: false
48 changes: 48 additions & 0 deletions .conform.yaml
@@ -0,0 +1,48 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:23:10Z by kres latest.

policies:
- type: commit
spec:
dco: true
gpg:
required: true
identity:
gitHubOrganization: siderolabs
spellcheck:
locale: US
maximumOfOneCommit: true
header:
length: 89
imperative: true
case: lower
invalidLastCharacters: .
body:
required: true
conventional:
types:
- chore
- docs
- perf
- refactor
- style
- test
- release
scopes:
- .*
- type: license
spec:
root: .
skipPaths:
- .git/
- testdata/
includeSuffixes:
- .go
excludeSuffixes:
- .pb.go
- .pb.gw.go
header: |
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 changes: 11 additions & 0 deletions .dockerignore
@@ -0,0 +1,11 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:23:10Z by kres latest.

*
!copy
!go.mod
!go.sum
!.golangci.yml
!README.md
!.markdownlint.json
9 changes: 3 additions & 6 deletions .github/workflows/ci.yaml
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:14:30Z by kres 5724eac-dirty.
# Generated on 2024-03-06T18:28:09Z by kres latest.

name: default
concurrency:
Expand All @@ -9,13 +9,13 @@ concurrency:
"on":
push:
branches:
- ""
- main
- release-*
tags:
- v*
pull_request:
branches:
- ""
- main
- release-*
jobs:
default:
Expand Down Expand Up @@ -59,9 +59,6 @@ jobs:
- name: unit-tests-race
run: |
make unit-tests-race
- name: coverage
run: |
make coverage
- name: lint
run: |
make lint
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:14:30Z by kres 5724eac-dirty.

_out
178 changes: 178 additions & 0 deletions .golangci.yml
@@ -0,0 +1,178 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:14:30Z by kres 5724eac-dirty.

# options for analysis running
run:
timeout: 10m
issues-exit-code: 1
tests: true
build-tags: []
skip-dirs: []
skip-dirs-use-default: true
skip-files: []
modules-download-mode: readonly

# output configuration options
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""

# all available settings of specific linters
linters-settings:
dogsled:
max-blank-identifiers: 2
dupl:
threshold: 150
errcheck:
check-type-assertions: true
check-blank: true
exhaustive:
default-signifies-exhaustive: false
funlen:
lines: 60
statements: 40
gci:
local-prefixes: github.com/siderolabs/go-copy/
gocognit:
min-complexity: 30
ireturn:
allow:
- anon
- error
- empty
- stdlib
- github.com\/talos-systems\/kres\/internal\/dag.Node
nestif:
min-complexity: 5
goconst:
min-len: 3
min-occurrences: 3
gocritic:
disabled-checks: []
gocyclo:
min-complexity: 20
godot:
check-all: false
godox:
keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-arounds that should be removed before merging
gofmt:
simplify: true
goimports:
local-prefixes: github.com/siderolabs/go-copy/
golint:
min-confidence: 0.8
gomnd:
settings: {}
gomodguard: {}
govet:
check-shadowing: true
enable-all: true
lll:
line-length: 200
tab-width: 4
misspell:
locale: US
ignore-words: []
nakedret:
max-func-lines: 30
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
nolintlint:
allow-unused: false
allow-leading-space: false
allow-no-explanation: []
require-explanation: false
require-specific: true
rowserrcheck: {}
testpackage: {}
unparam:
check-exported: false
unused:
check-exported: false
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
wsl:
strict-append: true
allow-assign-and-call: true
allow-multiline-assign: true
allow-cuddle-declarations: false
allow-trailing-comment: false
force-case-trailing-whitespace: 0
force-err-cuddling: false
allow-separated-leading-comment: false
gofumpt:
extra-rules: false
cyclop:
# the maximal code complexity to report
max-complexity: 20
# depguard:
# Main:
# deny:
# - github.com/OpenPeeDeeP/depguard # this is just an example

linters:
enable-all: true
disable-all: false
fast: false
disable:
- exhaustruct
- exhaustivestruct
- forbidigo
- funlen
- gas
- gochecknoglobals
- gochecknoinits
- godox
- goerr113
- gomnd
- gomoddirectives
- ireturn
- nestif
- nonamedreturns
- nosnakecase
- paralleltest
- tagliatelle
- thelper
- typecheck
- varnamelen
- wrapcheck
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
- tagalign
- inamedparam
- testifylint # complains about our assert recorder and has a number of false positives for assert.Greater(t, thing, 1)
- protogetter # complains about us using Value field on typed spec, instead of GetValue which has a different signature
- perfsprint # complains about us using fmt.Sprintf in non-performance critical code, updating just kres took too long
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- interfacer
- maligned
- golint
- scopelint
- varcheck
- deadcode
- structcheck
- ifshort
# disabled as it seems to be broken - goes into imported libraries and reports issues there
- musttag

issues:
exclude: []
exclude-rules: []
exclude-use-default: false
exclude-case-sensitive: false
max-issues-per-linter: 10
max-same-issues: 3
new: false

severity:
default-severity: error
case-sensitive: false
5 changes: 5 additions & 0 deletions .kres.yaml
@@ -0,0 +1,5 @@
---
kind: service.CodeCov
spec:
# there are no tests in this project
enabled: false
3 changes: 3 additions & 0 deletions .license-header.go.txt
@@ -0,0 +1,3 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 changes: 9 additions & 0 deletions .markdownlint.json
@@ -0,0 +1,9 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-03-06T17:23:10Z by kres latest.

{
"MD013": false,
"MD033": false,
"default": true
}

0 comments on commit aa4ade4

Please sign in to comment.