Skip to content

Commit

Permalink
chore: fix linting error for nolint comment
Browse files Browse the repository at this point in the history
  • Loading branch information
clementnuss committed Aug 29, 2022
1 parent 68c6657 commit 9562c44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/controller/csr_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ type CertificateSigningRequestReconciler struct {
// Reconcile will perform a series of checks before deciding whether the CSR should be approved or denied
// cyclomatic complexity is high (over 15), but this improves
// readibility for the programmer, therefore we ignore the linting error
// nolint: gocyclo
//
//nolint:gocyclo
func (r *CertificateSigningRequestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, returnErr error) {
l := log.FromContext(ctx)

Expand Down
3 changes: 2 additions & 1 deletion internal/controller/regex_ip_checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import (
// DNSCheck is a function checking that the DNS name:
// complies with the provider-specific regex
// is resolvable (this check can be opted out with a parameter)
// nolint: gocyclo
//
//nolint:gocyclo
func (r *CertificateSigningRequestReconciler) DNSCheck(ctx context.Context, csr *certificatesv1.CertificateSigningRequest, x509cr *x509.CertificateRequest) (valid bool, reason string, err error) {
if valid = (len(x509cr.DNSNames) <= r.AllowedDNSNames); !valid {
reason = "The x509 Cert Request contains more DNS names than allowed through the config flag"
Expand Down

0 comments on commit 9562c44

Please sign in to comment.