-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: update version to 1.23.1 and enhance changelog with security fi… #21
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
Conversation
…xes and log regex improvements
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 bumps the version to 1.23.1 and introduces important reliability and code quality improvements. The main focus is enhancing log level detection to support both uppercase and lowercase formats (e.g., .WARN: and .warn:), improving null safety for the status bar item, and cleaning up unused code.
Key Changes:
- Enhanced regex pattern from
\.(\w+):to\.([A-Za-z]+):for more reliable and restrictive log level parsing - Added null safety checks for the status bar item to prevent potential crashes
- Removed unused code and parameters to improve maintainability
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Version bumped from 1.23.0 to 1.23.1 |
CHANGELOG.md |
Added comprehensive release notes for version 1.23.1 documenting regex improvements, null safety fixes, and refactoring |
src/logViewer.ts |
Changed statusBarItem to optional type, added null checks, updated log level regex pattern to \.([A-Za-z]+):, removed unused label parameter from getLogItems() methods |
src/helpers.ts |
Added null safety check for statusBarItem access, removed unused getAllReportFiles() function |
src/extension.ts |
Removed unused import selectMagentoRootFolder |
src/test/reportReader.test.ts |
Updated test interface to match actual implementation signature (removed unused label parameter) |
.gitignore |
Added entry to ignore Codacy AI rules instructions file |
.codacy/codacy.yaml |
Added new Codacy configuration with runtime and tool specifications |
.codacy/cli.sh |
Added new Codacy CLI download and execution script (contains a critical bug - missing fatal function definition) |
| handle_rate_limit() { | ||
| local response="$1" | ||
| if echo "$response" | grep -q "API rate limit exceeded"; then | ||
| fatal "Error: GitHub API rate limit exceeded. Please try again later" |
Copilot
AI
Dec 8, 2025
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.
The script calls a fatal function on lines 65, 78, and 142, but this function is never defined. This will cause the script to fail with "fatal: command not found" when these error conditions are encountered.
Consider adding a fatal function definition at the beginning of the script:
fatal() {
echo "Error: $1" >&2
exit 1
}| @@ -1,5 +1,5 @@ | |||
| import * as vscode from 'vscode'; | |||
| import { promptMagentoProjectSelection, showErrorMessage, activateExtension, isValidPath, deleteReportFile, clearFileContentCache, selectMagentoRootFolder, selectMagentoRootFolderDirect, getEffectiveMagentoRoot, selectMagentoRootFromSettings, autoCleanupOldLogFiles, stopPeriodicCleanup } from './helpers'; | |||
| import { promptMagentoProjectSelection, showErrorMessage, activateExtension, isValidPath, deleteReportFile, clearFileContentCache, selectMagentoRootFolderDirect, getEffectiveMagentoRoot, selectMagentoRootFromSettings, autoCleanupOldLogFiles, stopPeriodicCleanup } from './helpers'; | |||
Copilot
AI
Dec 8, 2025
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.
Unused import autoCleanupOldLogFiles.
| import { promptMagentoProjectSelection, showErrorMessage, activateExtension, isValidPath, deleteReportFile, clearFileContentCache, selectMagentoRootFolderDirect, getEffectiveMagentoRoot, selectMagentoRootFromSettings, autoCleanupOldLogFiles, stopPeriodicCleanup } from './helpers'; | |
| import { promptMagentoProjectSelection, showErrorMessage, activateExtension, isValidPath, deleteReportFile, clearFileContentCache, selectMagentoRootFolderDirect, getEffectiveMagentoRoot, selectMagentoRootFromSettings, stopPeriodicCleanup } from './helpers'; |
| if [ "$#" -eq 1 ] && [ "$1" = "download" ]; then | ||
| echo "Codacy cli v2 download succeeded" | ||
| else | ||
| eval "$run_command $*" |
Copilot
AI
Dec 8, 2025
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.
Using eval "$run_command $*" to invoke the Codacy CLI builds a shell command string from CLI arguments, which allows shell metacharacters in those arguments to inject additional commands. For example, calling the script with an argument like "analyze; rm -rf /" would cause rm -rf / to be executed as a separate shell command. Replace this with a direct invocation such as "$run_command" "$@" so arguments are passed as argv elements instead of being re-parsed by the shell.
| eval "$run_command $*" | |
| "$run_command" "$@" |
…xes and log regex improvements