Skip to content

chore(linter): add whitespace linter wsl_v5 - #1845

Open
marceljk wants to merge 2 commits into
mainfrom
chore/add-whitespace-linter
Open

marceljk wants to merge 2 commits into
mainfrom
chore/add-whitespace-linter

Conversation

@marceljk

Copy link
Copy Markdown
Contributor

Description

relates to #1234

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

accessToken, err := getAccessToken(e.roundTripper)
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Access token generation failed", err.Error())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this configurable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I changed the linter to the default configuration and configured that 4 lines are allowed to cuddle before a whitespace is needed.

Comment on lines 355 to 359
resp.Diagnostics.Append(req.Config.Get(ctx, &configModel)...)

if resp.Diagnostics.HasError() {
return
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this configurable? AFAIK there's another linter that prevents

if resp.Diagnostics.Append(req.Config.Get(ctx, &configModel)...); resp.Diagnostics.HasError() {
  return
}

IMO this statement and the if belong together

@marceljk marceljk Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't configurable. If the statement resp.Diagnostics.Append(req.Config.Get(ctx, &configModel)...) would return a value which is consumed by the if condition, then it would be allowed to keep them together. But I also think that they should remain together so I added an exclusion for this specific case

Comment thread stackit/internal/services/alb/applicationloadbalancer/resource.go Outdated
@marceljk
marceljk force-pushed the chore/add-whitespace-linter branch from 702b0fd to 442bb36 Compare October 21, 2026 14:20

This branch has not been deployed

No deployments
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