-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add CI, Tag, Backport, Commands workflows and issue templates #62
Conversation
925811e
to
a7c0bc5
Compare
@ulucinar can we merge the stuff from #28 in with this PR? I think its time to pull the trigger on that one. I recommend making the repo naming more generic than |
Hi @jeanduplessis,
What do you think? |
@ulucinar a series of PRs sounds good to me 👍🏻 |
- Move uptest to cmd/uptest - Add version.Version - Add copyright headers Signed-off-by: Alper Rifat Ulucinar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments pertaining to linters.
internal/prepare.go
Outdated
} | ||
|
||
func generateRFC1123SubdomainCompatibleString() string { | ||
rand.Seed(time.Now().UnixNano()) | ||
s := make([]rune, 8) | ||
for i := range s { | ||
s[i] = charset[rand.Intn(len(charset))] | ||
s[i] = charset[rand.Intn(len(charset))] // #nosec G404: no need for crypto/rand here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can // nolint
cover this for consistency with the other overrides?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
internal/crdschema/crd.go
Outdated
@@ -232,7 +231,7 @@ func filterNonBreaking(diffMap map[string]*diff.Diff) map[string]*diff.Diff { | |||
return diffMap | |||
} | |||
|
|||
func ignoreOptionalNewProperties(sd *diff.SchemaDiff) { | |||
func ignoreOptionalNewProperties(sd *diff.SchemaDiff) { // nolint:gocyclo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I highly recommend enabling nolintlint
. It requires folks to explain why they're adding a nolint
directive, and also catches nolint
directives that are ineffective, e.g. because a function that used to be over the cyclomatic complexity level later dropped below it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also broken some high cyclomatic complexity functions.
.golangci.yml
Outdated
revive: | ||
# confidence for issues, default is 0.8 | ||
confidence: 0.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest removing this block. Doing so causes revive
to catch the things that golint
used to catch. See crossplane/crossplane@74e387b for more context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @negz, very helpful. When this configuration block is removed, we now have to document, for example, exported APIs. Removed this block, and added some package docs and exported API docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ulucinar LGTM!
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Description of your changes
This PR adds CI, Tag, Backport, Commands workflows and issue templates, and:
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
make reviewable
Also the linter fixes on the regular expressions have been manually validated.