Skip to content

cmd/generate-config: address golangci-lint issues#2660

Merged
stgraber merged 1 commit intolxc:mainfrom
RageZBla:chore-golangci-lint-cmd-generate-config
Nov 25, 2025
Merged

cmd/generate-config: address golangci-lint issues#2660
stgraber merged 1 commit intolxc:mainfrom
RageZBla:chore-golangci-lint-cmd-generate-config

Conversation

@RageZBla
Copy link
Copy Markdown
Contributor

This PR relates to #2636 and address the lint issues in cmd/generate-config

@stgraber
Copy link
Copy Markdown
Member

A few small fixes needed (separation between code blocks).

Also, did you run make update-metadata to confirm that those changes don't actually lead to any change to the generated output?

@github-actions github-actions bot added the Documentation Documentation needs updating label Nov 16, 2025
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.

@stgraber I am not sure if that's expected, the check on cast are not going to change behavior. If the cast would not happen without the check it would panic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We'll need to figure out exactly what change is causing the change to the generated output. It may be that using temporary variables somehow impacts iteration order or something.

@RageZBla
Copy link
Copy Markdown
Contributor Author

A few small fixes needed (separation between code blocks).

@stgraber thanks for reviewing. Do we have the wsl golangci-lint linter enable? I mean the linter was happy without the line break.

Also, did you run make update-metadata to confirm that those changes don't actually lead to any change to the generated output?

I did commit the output of the task/job after it seems mostly reordering. Maybe you are hinting that some behavior changed but it should not be the case.

@RageZBla RageZBla requested a review from stgraber November 16, 2025 06:47
@stgraber
Copy link
Copy Markdown
Member

@stgraber thanks for reviewing. Do we have the wsl golangci-lint linter enable? I mean the linter was happy without the line break.

No but we have our own variation of it in later static analysis tests.

@stgraber
Copy link
Copy Markdown
Member

I did commit the output of the task/job after it seems mostly reordering. Maybe you are hinting that some behavior changed but it should not be the case.

Yeah, each block must start by the config:option line or it's going to be completely invalid and wreck the documentation, so the change that's happening here is very very wrong :)

@RageZBla
Copy link
Copy Markdown
Contributor Author

I did commit the output of the task/job after it seems mostly reordering. Maybe you are hinting that some behavior changed but it should not be the case.

Yeah, each block must start by the config:option line or it's going to be completely invalid and wreck the documentation, so the change that's happening here is very very wrong :)

I see, let me do some research and see what went wrong.

@RageZBla
Copy link
Copy Markdown
Contributor Author

@stgraber thanks for reviewing. Do we have the wsl golangci-lint linter enable? I mean the linter was happy without the line break.

No but we have our own variation of it in later static analysis tests.

@stgraber any way to run that check locally?

@stgraber
Copy link
Copy Markdown
Member

make static-analysis runs everything

@github-actions github-actions bot removed the Documentation Documentation needs updating label Nov 22, 2025
@RageZBla
Copy link
Copy Markdown
Contributor Author

@stgraber I think this version is not breaking the documentation anymore, if you can confirm. I am not sure why some of the tests are failing but it looks like some dependencies can't be download so it might have been temporary.

@stgraber stgraber force-pushed the chore-golangci-lint-cmd-generate-config branch from 4994f37 to 8055b29 Compare November 25, 2025 03:12
@stgraber stgraber merged commit 84727ce into lxc:main Nov 25, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants