crossplane-contrib / provider-upjet-aws

AWS Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-aws/
Apache License 2.0
147 stars 124 forks source link

`nolint:gocyclo` resource configurations #1530

Closed mergenci closed 3 weeks ago

mergenci commented 1 month ago

Description of your changes

//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: https://github.com/crossplane-contrib/provider-upjet-aws/pull/1528

I have:

How has this code been tested

See the result of the linter job.