-
Notifications
You must be signed in to change notification settings - Fork 9
fix: escape characters from paths CF-2117 #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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 preferencesFootnotes
|
Codacy's Analysis Summary0 new issue (≤ 1 medium issue) Review Pull Request in Codacy →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements path escaping for special shell characters to fix issue CF-2117. The changes add proper escaping logic to handle file paths that contain spaces, quotes, and other special characters that could break shell command execution.
Changes:
- Added
preparePathForExecmethod inCodacyClito escape special shell characters using backslash escaping - Refactored
processSarifResultsfunction into a newutils.tsfile for better code organization - Updated
WinWSLCodacyClito properly convert and escape Windows paths for WSL execution - Added comprehensive test suite covering various special characters and edge cases
- Removed unused parameters from
SetupView.resolveWebviewViewmethod
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cli/CodacyCli.ts | Implements base path escaping logic that escapes special shell characters |
| src/cli/MacCodacyCli.ts | Updates import to use new utils module |
| src/cli/WinWSLCodacyCli.ts | Refactors Windows-to-WSL path conversion and adds character escaping |
| src/cli/WinCodacyCli.ts | Updates import to use new utils module |
| src/cli/index.ts | Removes processSarifResults function and re-exports from utils |
| src/cli/utils.ts | New file containing extracted processSarifResults utility function |
| src/test/suite/cli/pathEscaping.test.ts | Comprehensive test suite for path escaping across all platforms |
| src/views/SetupView.ts | Cleanup: removes unused interface method parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.