Exclude frontend files from Sonar analysis and introduce constants#143
Merged
Exclude frontend files from Sonar analysis and introduce constants#143
Conversation
added 11 commits
March 4, 2026 15:32
Replace local variable 'round' with 'nround' to avoid shadowing the built-in round() function. Also adjusted import ordering and cleaned up whitespace.
Consolidate and rename error/log message constants in client/server APIs, and use formatted error strings for request creation/sending. Make TUI validation and render errors more descriptive. Add helpers in Python CLI to normalize architectures, map platforms, and enumerate available binaries; improve binary-not-found diagnostics. Centralize flagchecker host warning text and tidy imports in exploiter manager.
Use bin_dir.rglob to find files and filter to relative paths with exactly four components (preserving the bin/arch/platform/file layout). Replace nested directory iterations and remove an unnecessary NOSONAR comment.
Use camelCase per Go naming conventions; update function parameters and X-Team-Token header usage in PROTOCOL_GUIDE.md and cc_http.go
Collaborator
Author
|
Ok fixed all issue last things is the Coverage not good but because not all modules are tested. |
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 introduces several improvements and refactorings across the codebase, focusing on increased maintainability, consistency, and code reuse. The main changes include the introduction of constants to avoid magic strings and repeated literals, improved configuration file handling, and enhanced clarity in command descriptions and logging.
Refactoring for Consistency and Maintainability:
Introduced constants in
api.go(such asinvaldUrlMessage,cookieName, andsucessMessage) to replace repeated string literals, improving maintainability and reducing the risk of typos. Updated all relevant usages to reference these constants. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Defined a
defaultConfigNameconstant inmanager.goand used it throughout the configuration management code, replacing hardcoded"config.yml"strings for improved consistency. [1] [2] [3] [4] [5] [6]TUI Command Handling Improvements:
exploitListCommand,exploitStopCommand,exploitRunCommand) in the TUI layer, replacing magic strings and updating all usages for better code clarity and easier refactoring. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Documentation and Usability Enhancements:
Other Minor Improvements:
These changes collectively make the codebase more robust, readable, and easier to maintain.