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

nolint:gocyclo resource configurations #1530

Conversation

mergenci
Copy link
Collaborator

@mergenci mergenci commented Oct 18, 2024

Description of your changes

  • Add //nolint:gocyclo to resource configuration files, config/*/config.go, that didn't have it.
  • In the ones that have it, but in the form // nolint:gocyclo, replace it with //nolint:gocyclo, which seems to be the standard form going forward.

//nolint:gocyclo has been our de facto solution to cyclomatic complexity errors in resource configuration files. Cyclomatic complexity doesn't really apply to resource configurations. Configurations contain limited business logic, if any, which is independent between resources, even if they are defined inside the same function.

Our linter takes a long time to complete. Discovering the cyclomatic complexity error after a standard resource configuration introduces unnecessary latency to our release process. Here is the latest example: #1528

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

See the result of the linter job.

@jeanduplessis jeanduplessis merged commit db6ece3 into crossplane-contrib:main Oct 29, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants