Skip to content

Commit 3b1a340

Browse files
committed
stage client-go
On-behalf-of: @SAP [email protected]
1 parent 8d9c54f commit 3b1a340

File tree

1,194 files changed

+92778
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,194 files changed

+92778
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Thanks for creating a pull request!
3+
4+
If this is your first time, please make sure to review CONTRIBUTING.MD.
5+
6+
Please copy the appropriate `:text:` or icon to the beginning of your PR title:
7+
8+
:sparkles: ✨ feature
9+
:bug: 🐛 bug fix
10+
:book: 📖 docs
11+
:memo: 📝 proposal
12+
:warning: ⚠️ breaking change
13+
:seedling: 🌱 other/misc
14+
:question: ❓ requires manual review/categorization
15+
16+
-->
17+
## Summary
18+
19+
## Related issue(s)
20+
21+
Fixes #
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Verifier
2+
3+
on:
4+
# NB: using `pull_request_target` runs this in the context of
5+
# the base repository, so it has permission to upload to the checks API.
6+
# This means changes won't kick in to this file until merged onto the
7+
# main branch.
8+
pull_request_target:
9+
types: [opened, edited, reopened, synchronize]
10+
11+
jobs:
12+
verify:
13+
name: verify PR contents
14+
permissions:
15+
checks: write
16+
pull-requests: read
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Verifier action
20+
id: verifier
21+
uses: kubernetes-sigs/[email protected]
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
bin/
8+
hack/tools/
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Dependency directories (remove the comment below to include it)
17+
# vendor/
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
run:
2+
timeout: 10m
3+
allow-parallel-runners: true
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- asasalint
9+
- asciicheck
10+
- bidichk
11+
- bodyclose
12+
- containedctx
13+
- dupword
14+
- durationcheck
15+
- errcheck
16+
- errchkjson
17+
- exportloopref
18+
- gocritic
19+
- godot
20+
- gofmt
21+
- goprintffuncname
22+
- gosec
23+
- gosimple
24+
- govet
25+
- importas
26+
- ineffassign
27+
- misspell
28+
- nilerr
29+
- noctx
30+
- nolintlint
31+
- nosprintfhostport
32+
- prealloc
33+
- revive
34+
- staticcheck
35+
- unconvert
36+
- unused
37+
- usestdlibvars
38+
- whitespace
39+
# TODO(vincepri): Figure out if we want to enable or remove the following linters:
40+
# - predeclared
41+
# - goconst
42+
43+
linters-settings:
44+
misspell:
45+
ignore-words:
46+
- creater
47+
goconst:
48+
ignore-tests: true
49+
nolintlint:
50+
allow-unused: false
51+
allow-leading-space: false
52+
require-specific: true
53+
revive:
54+
revive:
55+
rules:
56+
- name: context-keys-type
57+
- name: error-return
58+
- name: error-strings
59+
- name: error-naming
60+
- name: if-return
61+
- name: increment-decrement
62+
- name: var-declaration
63+
- name: package-comments
64+
- name: range
65+
- name: receiver-naming
66+
- name: time-naming
67+
- name: errorf
68+
- name: superfluous-else
69+
- name: unreachable-code
70+
- name: bool-literal-in-expr
71+
- name: constant-logical-expr
72+
# TODO(vincepri): Figure out if we want to enable
73+
# the following rules, or remove them completely, they're a bit noisy.
74+
# - name: context-as-argument
75+
# - name: var-naming
76+
# - name: exported
77+
# - name: unexported-return
78+
# - name: blank-imports
79+
# - name: indent-error-flow # I think @ncdc prefers explicit else statements, remove?
80+
# - name: redefines-builtin-id
81+
# - name: dot-imports
82+
gosec:
83+
excludes:
84+
- G307 # Deferring unsafe method "Close" on type "\*os.File"
85+
- G108 # Profiling endpoint is automatically exposed on /debug/pprof
86+
# TODO(vincepri): The following should be looked at and removed in future iterations.
87+
- G401 # Use of weak cryptographic primitive (replace sha1 usage)
88+
- G505 # crypto/sha1: weak cryptographic primitive
89+
- G402 # TLS MinVersion too low (set MinVersion in TLSClientConfig)
90+
- G404 # Use of weak random number generator (use crypto/rand)
91+
- G101 # Potential hardcoded credentials (returns false positives)
92+
- G306 # Expect WriteFile permissions to be 0600 or less
93+
gocritic:
94+
enabled-tags:
95+
- diagnostic
96+
- experimental
97+
- performance
98+
disabled-checks:
99+
- appendAssign
100+
- dupImport # https://github.com/go-critic/go-critic/issues/845
101+
- evalOrder
102+
- ifElseChain
103+
- octalLiteral
104+
- regexpSimplify
105+
- sloppyReassign
106+
- truncateCmp
107+
- typeDefFirst
108+
- unnamedResult
109+
- unnecessaryDefer
110+
- whyNoLint
111+
- wrapperFunc
112+
- unnecessaryBlock
113+
- rangeValCopy
114+
- hugeParam
115+
- commentedOutCode
116+
# TODO(vincepri): potentially enable the following?
117+
- emptyStringTest
118+
- singleCaseSwitch
119+
- nestingReduce
120+
- filepathJoin
121+
- tooManyResultsChecker
122+
123+
issues:
124+
max-same-issues: 0
125+
max-issues-per-linter: 0
126+
exclude-files:
127+
- '.+_expansion\.go'
128+
exclude-rules:
129+
- linters:
130+
- unparam
131+
text: always receives
132+
- linters:
133+
- gosec
134+
path: _test\.go
135+
text: "G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server"
136+
- linters:
137+
- gosec
138+
path: test/e2e/*
139+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
presubmits:
2+
- name: pull-client-go-verify
3+
always_run: true
4+
decorate: true
5+
clone_uri: "ssh://[email protected]/kcp-dev/client-go.git"
6+
labels:
7+
preset-goproxy: "true"
8+
spec:
9+
containers:
10+
- image: ghcr.io/kcp-dev/infra/build:1.24.5-1
11+
command:
12+
- make
13+
- verify
14+
15+
- name: pull-client-go-lint
16+
always_run: true
17+
decorate: true
18+
clone_uri: "ssh://[email protected]/kcp-dev/client-go.git"
19+
labels:
20+
preset-goproxy: "true"
21+
spec:
22+
containers:
23+
- image: ghcr.io/kcp-dev/infra/build:1.24.5-1
24+
command:
25+
- make
26+
- lint
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing to kcp
2+
3+
kcp is [Apache 2.0 licensed](LICENSE) and we accept contributions via
4+
GitHub pull requests.
5+
6+
Please read the following guide if you're interested in contributing to kcp.
7+
8+
## Certificate of Origin
9+
10+
By contributing to this project you agree to the Developer Certificate of
11+
Origin (DCO). This document was created by the Linux Kernel community and is a
12+
simple statement that you, as a contributor, have the legal right to make the
13+
contribution. See the [DCO](DCO) file for details.
14+
15+
## Getting started
16+
17+
Please see the `kcp-dev/kcp` contributing guidelines [here](https://github.com/kcp-dev/kcp/blob/main/CONTRIBUTING.md) for more details.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
6+
Everyone is permitted to copy and distribute verbatim copies of this
7+
license document, but changing it is not allowed.
8+
9+
10+
Developer's Certificate of Origin 1.1
11+
12+
By making a contribution to this project, I certify that:
13+
14+
(a) The contribution was created in whole or in part by me and I
15+
have the right to submit it under the open source license
16+
indicated in the file; or
17+
18+
(b) The contribution is based upon previous work that, to the best
19+
of my knowledge, is covered under an appropriate open source
20+
license and I have the right under that license to submit that
21+
work with modifications, whether created in whole or in part
22+
by me, under the same open source license (unless I am
23+
permitted to submit under a different license), as indicated
24+
in the file; or
25+
26+
(c) The contribution was provided directly to me by some other
27+
person who certified (a), (b) or (c) and I have not modified
28+
it.
29+
30+
(d) I understand and agree that this project and the contribution
31+
are public and that a record of the contribution (including all
32+
personal information I submit with it, including my sign-off) is
33+
maintained indefinitely and may be redistributed consistent with
34+
this project or the open source license(s) involved.

0 commit comments

Comments
 (0)