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

chore(deps): update dependency golangci/golangci-lint to v1.58.2 (master) #5648

Merged
merged 10 commits into from
May 24, 2024

Conversation

crossplane-renovate[bot]
Copy link
Contributor

@crossplane-renovate crossplane-renovate bot commented May 4, 2024

This PR contains the following updates:

Package Update Change
golangci/golangci-lint minor 1.57.2 -> 1.58.2

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

golangci/golangci-lint (golangci/golangci-lint)

v1.58.2

Compare Source

  1. Updated linters
    • canonicalheader: from 1.0.6 to 1.1.1
    • gosec: from 2.19.0 to 2.20.0
    • musttag: from 0.12.1 to 0.12.2
    • nilnil: from 0.1.8 to 0.1.9
  2. Documentation
    • Improve integrations and install pages

v1.58.1

Compare Source

  1. Updated linters
    • tagalign: from 1.3.3 to 1.3.4
    • protogetter: from 0.3.5 to 0.3.6
    • gochecknoinits: fix analyzer name
  2. Fixes
    • Restores previous gihub-actions output format (removes GitHub Action problem matchers)

v1.58.0

Compare Source

  1. New linters
  2. Updated linters
    • copyloopvar: from 1.0.10 to 1.1.0 (ignore-alias is replaced by check-alias with the opposite behavior)
    • decorder: from 0.4.1 to 0.4.2
    • errname: from 0.1.12 to 0.1.13
    • errorlint: from 1.4.8 to 1.5.1 (new options allowed-errors and allowed-errors-wildcard)
    • execinquery: deprecate linter ⚠️
    • gci: from 0.12.3 to 0.13.4 (new section localModule)
    • gocritic: from 0.11.2 to 0.11.3
    • spancheck: from 0.5.3 to 0.6.1
    • goerr113 is replaced by err113 ⚠️
    • gomnd is replaced by mnd ⚠️
    • gomodguard: from 1.3.1 to 1.3.2
    • grouper: from 1.1.1 to 1.1.2
    • intrange: from 0.1.1 to 0.1.2
    • mirror: from 1.1.0 to 1.2.0
    • misspell: from 0.4.1 to 0.5.1
    • musttag: from 0.9.0 to 0.12.1
    • nilnil: from 0.1.7 to 0.1.8
    • nonamedreturns: from 1.0.4 to 1.0.5
    • promlinter: from 0.2.0 to 0.3.0
    • sloglint: from 0.5.0 to 0.6.0
    • unparam: bump to HEAD (063aff9)
    • whitespace: from 0.1.0 to 0.1.1
  3. Enhancements
    • Speed up "fast" linters when only "fast" linters are run: between 40% and 80% faster at first run (i.e. without cache)
  4. Fixes
    • Use version with module plugins
    • Skip go.mod report inside autogenerated processor
    • Keep only typecheck issues when needed
    • Don't hide typecheck errors inside diff processor
  5. Misc.
    • ⚠️ log an error when using previously deprecated linters (Linter Deprecation Cycle)
      • deadcode: deprecated since v1.49.0 (2022-08-23).
      • exhaustivestruct: deprecated since v1.46.0 (2022-05-08).
      • golint: deprecated since v1.41.0 (2021-06-15).
      • ifshort: deprecated since v1.48.0 (2022-08-04).
      • interfacer: deprecated since v1.38.0 (2021-03-03).
      • maligned: deprecated since v1.38.0 (2021-03-03).
      • nosnakecase: deprecated since v1.48.0 (2022-08-04).
      • scopelint: deprecated since v1.39.0 (2021-03-25).
      • structcheck: deprecated since v1.49.0 (2022-08-23).
      • varcheck: deprecated since v1.49.0 (2022-08-23).
    • ⚠️ Deprecate usage of linter alternative names
    • Remove help display on errors with config verify command
    • Add pre-commit hook to run config verify
    • Improve github-action output
  6. Documentation
    • Remove deprecated Atom from Editor Integrations

GitHub Action (v5.1.0) for golangci-lint:

  • supports for pull, pull_request_target, and merge_group events with the option only-new-issues.
  • ️️⚠️ skip-pkg-cache and skip-build-cache have been removed because the cache related to Go itself is already handled by actions/setup-go.
  • with golangci-lint v1.58, the file information (path and position) will be displayed on the log.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@crossplane-renovate crossplane-renovate bot requested review from turkenh and a team as code owners May 4, 2024 08:11
@crossplane-renovate crossplane-renovate bot requested a review from phisco May 4, 2024 08:11
@crossplane-renovate
Copy link
Contributor Author

⚠ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Makefile
Command failed: make go.lint
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
apis/pkg/meta/v1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/pkg/meta/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/pkg/meta/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/secrets/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/secrets/secrets.go:26:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/apiextensions.go:28:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1/register.go:75:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1beta1/register.go:75:1: don't use `init` function (init)
func init() {
^
apis/pkg/pkg.go:28:1: don't use `init` function (init)
func init() {
^
internal/xpkg/fetch.go:37:1: don't use `init` function (init)
func init() { //nolint:gochecknoinits // See comment below.
^
internal/xpkg/build_test.go:53:1: don't use `init` function (init)
func init() {
^
apis/apis.go:28:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1/register.go:67:1: don't use `init` function (init)
func init() {
^
test/e2e/apiextensions_test.go:42:1: don't use `init` function (init)
func init() {
^
test/e2e/environmentconfig_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/realtimecompositions_test.go:30:1: don't use `init` function (init)
func init() {
^
test/e2e/usage_test.go:29:1: don't use `init` function (init)
func init() {
^
internal/controller/pkg/revision/fuzz_test.go:47:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/fuzz_test.go:37:1: don't use `init` function (init)
func init() {
^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:75:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:942:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
make: *** [build/makelib/golang.mk:176: go.lint] Error 1

File name: .github/workflows/ci.yml
Command failed: make go.lint
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
apis/pkg/v1beta1/register.go:75:1: don't use `init` function (init)
func init() {
^
apis/pkg/pkg.go:28:1: don't use `init` function (init)
func init() {
^
apis/secrets/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apis.go:28:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1/register.go:75:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
apis/apiextensions/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/apiextensions.go:28:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
apis/pkg/meta/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1/register.go:67:1: don't use `init` function (init)
func init() {
^
apis/pkg/meta/v1/register.go:59:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
apis/pkg/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/secrets/secrets.go:26:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/fuzz_test.go:37:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
test/e2e/apiextensions_test.go:42:1: don't use `init` function (init)
func init() {
^
test/e2e/environmentconfig_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/realtimecompositions_test.go:30:1: don't use `init` function (init)
func init() {
^
test/e2e/usage_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:75:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:942:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
apis/pkg/meta/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
internal/xpkg/fetch.go:37:1: don't use `init` function (init)
func init() { 
^
internal/xpkg/build_test.go:53:1: don't use `init` function (init)
func init() {
^
internal/controller/pkg/revision/fuzz_test.go:47:1: don't use `init` function (init)
func init() {
^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
make: *** [build/makelib/golang.mk:176: go.lint] Error 1

File name: Makefile
Command failed: make go.lint
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:75:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:942:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
apis/pkg/meta/v1/register.go:59:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
apis/pkg/v1beta1/register.go:75:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
apis/pkg/meta/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/fuzz_test.go:37:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
apis/pkg/pkg.go:28:1: don't use `init` function (init)
func init() {
^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
apis/pkg/meta/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
apis/apiextensions/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
apis/secrets/secrets.go:26:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1/register.go:75:1: don't use `init` function (init)
func init() {
^
apis/apis.go:28:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1/register.go:67:1: don't use `init` function (init)
func init() {
^
test/e2e/apiextensions_test.go:42:1: don't use `init` function (init)
func init() {
^
test/e2e/environmentconfig_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/realtimecompositions_test.go:30:1: don't use `init` function (init)
func init() {
^
test/e2e/usage_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
apis/secrets/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
apis/apiextensions/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/apiextensions.go:28:1: don't use `init` function (init)
func init() {
^
internal/xpkg/fetch.go:37:1: don't use `init` function (init)
func init() {
^
internal/xpkg/build_test.go:53:1: don't use `init` function (init)
func init() {
^
internal/controller/pkg/revision/fuzz_test.go:47:1: don't use `init` function (init)
func init() {
^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
make: *** [build/makelib/golang.mk:176: go.lint] Error 1

File name: .github/workflows/ci.yml
Command failed: make go.lint
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
apis/pkg/v1beta1/register.go:75:1: don't use `init` function (init)
func init() {
^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
apis/secrets/secrets.go:26:1: don't use `init` function (init)
func init() {
^
apis/secrets/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/pkg/v1/register.go:75:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1/register.go:67:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
apis/apis.go:28:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:75:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:942:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
apis/apiextensions/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/apiextensions.go:28:1: don't use `init` function (init)
func init() {
^
internal/xpkg/fetch.go:37:1: don't use `init` function (init)
func init() {
^
internal/xpkg/build_test.go:53:1: don't use `init` function (init)
func init() {
^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
apis/pkg/pkg.go:28:1: don't use `init` function (init)
func init() {
^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
apis/pkg/meta/v1beta1/register.go:51:1: don't use `init` function (init)
func init() {
^
apis/apiextensions/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
apis/pkg/meta/v1alpha1/register.go:59:1: don't use `init` function (init)
func init() {
^
internal/controller/pkg/revision/fuzz_test.go:47:1: don't use `init` function (init)
func init() {
^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
apis/pkg/v1alpha1/register.go:51:1: don't use `init` function (init)
func init() {
^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
internal/controller/apiextensions/composite/fuzz_test.go:37:1: don't use `init` function (init)
func init() {
^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
apis/pkg/meta/v1/register.go:59:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/apiextensions_test.go:42:1: don't use `init` function (init)
func init() {
^
test/e2e/environmentconfig_test.go:29:1: don't use `init` function (init)
func init() {
^
test/e2e/realtimecompositions_test.go:30:1: don't use `init` function (init)
func init() {
^
test/e2e/usage_test.go:29:1: don't use `init` function (init)
func init() {
^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
make: *** [build/makelib/golang.mk:176: go.lint] Error 1

@crossplane-renovate crossplane-renovate bot force-pushed the renovate/master-golangci-golangci-lint-1.x branch from 9312ebc to 58bf0d4 Compare May 9, 2024 08:12
@crossplane-renovate crossplane-renovate bot changed the title chore(deps): update dependency golangci/golangci-lint to v1.58.0 (master) chore(deps): update dependency golangci/golangci-lint to v1.58.1 (master) May 9, 2024
@crossplane-renovate
Copy link
Contributor Author

crossplane-renovate bot commented May 9, 2024

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Makefile
Command failed: make go.lint
level=warning msg="[config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`."
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:77:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:947:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
make: *** [build/makelib/golang.mk:131: go.lint] Error 1

File name: .github/workflows/ci.yml
Command failed: make go.lint
level=warning msg="[config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`."
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:77:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:947:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
make: *** [build/makelib/golang.mk:131: go.lint] Error 1

File name: Makefile
Command failed: make go.lint
level=warning msg="[config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`."
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:77:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:947:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
make: *** [build/makelib/golang.mk:131: go.lint] Error 1

File name: .github/workflows/ci.yml
Command failed: make go.lint
level=warning msg="[config_reader] The configuration option `linters.errcheck.ignore` is deprecated, please use `linters.errcheck.exclude-functions`."
level=warning msg="[lintersdb] The name \"goerr113\" is deprecated. The linter has been renamed to: err113."
level=warning msg="The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
level=warning msg="[linters_context] intrange: this linter is disabled because the Go version (1.21) of your project is lower than Go 1.22"
cmd/crank/beta/top/top.go:254:45: Magic number: 2, in <argument> detected (mnd)
				podType = strings.SplitN(labelKey, "/", 2)[1]
				                                        ^
cmd/crank/beta/top/top.go:205:57: Magic number: 1024, in <operation> detected (mnd)
			memory: fmt.Sprintf("%vMi", pod.MemoryUsage.Value()/(1024*1024)),
			                                                     ^
cmd/crank/beta/top/top.go:240:79: Magic number: 1024, in <operation> detected (mnd)
	fmt.Fprintf(w, "Memory: %s\n", fmt.Sprintf("%vMi", totalMemoryUsage.Value()/(1024*1024)))
	                                                                             ^
cmd/crank/xpkg/install.go:196:6: Magic number: 2, in <argument> detected (mnd)
		}, 2*time.Second)
		   ^
cmd/crank/xpkg/update.go:110:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
cmd/crank/xpkg/install.go:168:13: Magic number: 10, in <operation> detected (mnd)
	timeout := 10 * time.Second
	           ^
cmd/crank/beta/trace/trace.go:242:15: Magic number: 2, in <condition> detected (mnd)
	if length == 2 {
	             ^
internal/controller/apiextensions/composite/reconciler.go:254:51: Magic number: 0.5, in <operation> detected (mnd)
		return interval + time.Duration((rand.Float64()-0.5)*2*(float64(interval)*0.1)) //nolint:gosec // No need for secure randomness
		                                                ^
internal/controller/apiextensions/definition/composed.go:274:34: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(v, "/", 2)
	                                ^
internal/controller/apiextensions/definition/reconciler.go:481:81: Magic number: 30, in <argument> detected (mnd)
	ko.RateLimiter = workqueue.NewItemExponentialFailureRateLimiter(1*time.Second, 30*time.Second)
	                                                                               ^
internal/controller/apiextensions/definition/composed.go:278:7: Magic number: 2, in <case> detected (mnd)
	case 2:
	     ^
internal/controller/apiextensions/composition/revision.go:32:18: Magic number: 63, in <condition> detected (mnd)
	if len(hash) >= 63 {
	                ^
internal/controller/apiextensions/composition/revision.go:37:24: Magic number: 7, in <condition> detected (mnd)
	if len(nameSuffix) >= 7 {
	                      ^
internal/controller/apiextensions/usage/reconciler.go:328:17: Magic number: 2, in <argument> detected (mnd)
					time.Sleep(2 * time.Second)
					           ^
internal/controller/apiextensions/usage/reconciler.go:306:30: Magic number: 2, in <condition> detected (mnd)
			if len(usageList.Items) < 2 {
			                          ^
internal/xpkg/name.go:84:57: Magic number: 50, in <argument> detected (mnd)
	return ToDNSLabel(strings.Join([]string{truncate(name, 50), truncate(hash, 12)}, "-"))
	                                                       ^
internal/xpkg/name.go:98:11: Magic number: 62, in <condition> detected (mnd)
		if i == 62 {
		        ^
cmd/crossplane/core/core.go:229:52: Magic number: 10, in <argument> detected (mnd)
		go functionRunner.GarbageCollectConnections(ctx, 10*time.Minute)
		                                                 ^
cmd/crossplane/core/core.go:170:63: Magic number: 60, in <operation> detected (mnd)
		LeaseDuration:                 func() *time.Duration { d := 60 * time.Second; return &d }(),
		                                                            ^
cmd/crossplane/core/core.go:171:63: Magic number: 50, in <operation> detected (mnd)
		RenewDeadline:                 func() *time.Duration { d := 50 * time.Second; return &d }(),
		                                                            ^
cmd/crank/beta/convert/io/io.go:57:62: Magic number: 0o644, in <argument> detected (mnd)
		f, err := fs.OpenFile(outputFile, os.O_CREATE|os.O_WRONLY, 0o644)
		                                                           ^
cmd/crank/main.go:71:20: Magic number: 80, in <assign> detected (mnd)
			WrapUpperBound: 80,
			                ^
test/e2e/utils/cert.go:33:28: Magic number: 2019, in <argument> detected (mnd)
		SerialNumber: big.NewInt(2019),
		                         ^
test/e2e/utils/cert.go:45:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
test/e2e/utils/cert.go:53:49: Magic number: 4096, in <argument> detected (mnd)
	caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096)
	                                               ^
cmd/crank/beta/validate/image.go:67:40: Magic number: 2, in <argument> detected (mnd)
	lDigest := strings.SplitN(label, ":", 2)[1] // e.g.: sha256:0158764f65dc2a68728fdffa6ee6f2c9ef158f2dfed35abbd4f5bef8973e4b59
	                                      ^
cmd/crank/beta/xpkg/init.go:111:38: Magic number: 0o750, in <argument> detected (mnd)
		if err := os.MkdirAll(c.Directory, 0o750); err != nil {
		                                   ^
test/e2e/config/environment.go:140:48: Magic number: 32, in <argument> detected (mnd)
		name := envconf.RandomName("crossplane-e2e", 32)
		                                             ^
internal/initializer/cert_generator.go:68:50: Magic number: 2048, in <argument> detected (mnd)
	privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
	                                                ^
internal/initializer/crds_migrator.go:79:17: Magic number: 500, in <argument> detected (mnd)
			client.Limit(500),
			             ^
internal/initializer/tls.go:142:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:147:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:194:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:198:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
internal/initializer/tls.go:250:37: Magic number: 2022, in <argument> detected (mnd)
		SerialNumber:          big.NewInt(2022),
		                                  ^
internal/initializer/tls.go:254:45: Magic number: 10, in <argument> detected (mnd)
		NotAfter:              time.Now().AddDate(10, 0, 0),
		                                          ^
cmd/crank/version/version.go:47:59: Magic number: 30, in <argument> detected (mnd)
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	                                                         ^
test/e2e/funcs/env.go:108:4: nested context in loop (fatcontext)
			ctx, err = fn(ctx, c)
			^
test/e2e/funcs/feature.go:77:4: nested context in loop (fatcontext)
			ctx = fn(ctx, t, c)
			^
test/e2e/funcs/collect.go:135:43: Magic number: 2, in <argument> detected (mnd)
	parts := strings.SplitN(apiVersion, "/", 2)
	                                         ^
test/e2e/funcs/feature.go:947:56: Magic number: 500, in <argument> detected (mnd)
		_ = apimachinerywait.PollUntilContextCancel(pollCtx, 500*time.Millisecond, true, func(ctx context.Context) (done bool, err error) {
		                                                     ^
internal/xpkg/upbound/config/source.go:91:53: Magic number: 0o755, in <argument> detected (mnd)
		if err := src.fs.MkdirAll(filepath.Dir(src.path), 0o755); err != nil {
		                                                  ^
internal/xpkg/upbound/config/source.go:94:52: Magic number: 0o600, in <argument> detected (mnd)
		f, err := src.fs.OpenFile(src.path, os.O_CREATE, 0o600)
		                                                 ^
internal/xpkg/upbound/config/source.go:126:60: Magic number: 0o600, in <argument> detected (mnd)
	f, err := src.fs.OpenFile(src.path, os.O_RDWR|os.O_TRUNC, 0o600)
	                                                          ^
internal/controller/pkg/revision/runtime.go:63:35: Magic number: 2000, in <argument> detected (mnd)
	runAsUser                = int64(2000)
	                                 ^
internal/controller/pkg/revision/runtime.go:64:35: Magic number: 2000, in <argument> detected (mnd)
	runAsGroup               = int64(2000)
	                                 ^
make: *** [build/makelib/golang.mk:131: go.lint] Error 1

@crossplane-renovate crossplane-renovate bot force-pushed the renovate/master-golangci-golangci-lint-1.x branch 2 times, most recently from f5ae64f to 94af549 Compare May 20, 2024 08:13
@crossplane-renovate crossplane-renovate bot changed the title chore(deps): update dependency golangci/golangci-lint to v1.58.1 (master) chore(deps): update dependency golangci/golangci-lint to v1.58.2 (master) May 20, 2024
crossplane-renovate bot and others added 10 commits May 24, 2024 11:13
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
@phisco phisco force-pushed the renovate/master-golangci-golangci-lint-1.x branch from 94af549 to e2bee10 Compare May 24, 2024 12:05
@negz negz merged commit cee9758 into master May 24, 2024
17 of 18 checks passed
@negz negz deleted the renovate/master-golangci-golangci-lint-1.x branch May 24, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants