Merged
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Python fixes: - Fix _argparse.py: Change return type of _load_from_toml from None to argparse.Namespace to match actual return value - Fix _cmake.py: Reduce cognitive complexity by extracting helper methods (_process_keyword_cmake_args, _process_flag_cmake_args, _process_platform_cmake_args) - Fix _cmake_test.py: Reduce cognitive complexity by extracting test helpers and rename InterProcessReaderWriterLock variables to follow naming conventions GitHub Actions security fixes: - Use environment variables instead of direct interpolation for user-controlled data in run commands (pull_request.yml, format.yml, publish_release.yml) - Add input validation for workflow_dispatch tag parameter (draft_release.yml) Shell script fixes (run_tests.sh): - Replace [ ] with [[ ]] for safer conditional tests - Add explicit return statements at end of functions - Merge nested if conditions where applicable
64360c6 to
0668084
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 604 610 +6
Branches 101 101
=========================================
+ Hits 604 610 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
This PR fixes multiple SonarCloud violations across the codebase:
Python Code Fixes
cmake_pc_hooks/_argparse.py: Fixed return type annotation for_load_from_tomlmethod (wasNone, now correctlyargparse.Namespace)cmake_pc_hooks/_cmake.py: Reduced cognitive complexity by extracting helper methods (_process_keyword_cmake_args,_process_flag_cmake_args,_process_platform_cmake_args)tests/python/_cmake_test.py:InterProcessReaderWriterLock→mock_rw_lockandFileLock→mock_file_lockto follow naming conventionsGitHub Actions Security Fixes
.github/workflows/pull_request.yml: Use environment variable for PR body instead of direct interpolation to prevent command injection.github/workflows/format.yml: Use environment variables for branch names in run commands.github/workflows/publish_release.yml: Use environment variables for branch names in run commands.github/workflows/draft_release.yml: Added tag format validation step and use environment variable for run commandsShell Script Fixes
tests/run_tests.sh:[ ]with[[ ]]for safer conditional testsreturnstatements at end of functionsTest plan