[Fix] - Linting and Code Quality Improvements#31
Merged
Conversation
Updated error variable names for clarity in asset and propagation reconciler methods.
galt-tr
approved these changes
Dec 4, 2025
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request primarily adds
nolintcomments to suppress linter warnings about code complexity and nested conditionals in several controller and utility functions. These comments clarify that the complexity is intentional due to the need for handling multiple override cases and selective field merging. Additionally, there are minor variable renaming improvements for error handling in status update logic.Linting and Code Quality Improvements:
//nolint:gocognit,gocyclocomments to multipleupdate*methods in cluster controller files (cluster_asset.go,cluster_propagation.go,cluster_rpc.go,cluster_subtreevalidator.go) to suppress linter warnings about cognitive and cyclomatic complexity, acknowledging that the complexity is inherent to handling multiple override cases. [1] [2] [3] [4]//nolint:nestifcomments to selective field merging blocks in the same controller files, indicating that nested conditionals are required for the intended selective merging logic. [1] [2] [3]nolintcomments to utility functions incluster_helpers.goanddeployment.gofor override merging logic. [1] [2] [3]Minor Error Handling Improvements:
errtogetErrin status update blocks for reconciler functions inasset_controller.go,propagation_controller.go, andsubtreevalidator_controller.goto improve clarity and avoid shadowing. [1] [2] [3]