-
Notifications
You must be signed in to change notification settings - Fork 11
Feature/pmd #48
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
Feature/pmd #48
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 |
| ) | ||
|
|
||
| func DownloadFile(url string, destDir string) (string, error) { | ||
| log.Printf("Attempting to download from URL: %s", url) |
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.
AI added some logs which is generally fine, but in next PR I want to add some --verbose flag
cause client do not need this, but for us while we develop it can be helpful
or maybe better --debug flag
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 adds support for PMD analysis in the Codacy CLI by introducing new functionality and integrating PMD into relevant workflows and test suites. Key changes include:
- Enhancements to the download process with additional logging and improved HTTP request handling.
- New PMD integration via the addition of PMD-specific flags, analysis functions, and configuration files.
- Updates to plugin utilities to handle dynamic binary paths and updates to test files to cover PMD analysis.
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/download.go | Adds logging messages and implements file existence check logic |
| tools/testdata/repositories/pmd/RulesBreaker.java | Test data file intentionally violating PMD rules |
| tools/pmdRunner_test.go | Introduces tests for PMD runner functionality |
| tools/pmdRunner.go | Implements PMD runner with proper exit code handling |
| plugins/tools/pmd/plugin.yaml | Defines the PMD plugin configuration |
| plugins/tool-utils.go | Adjusts binary path templating logic in plugin utilities |
| cmd/analyze.go | Adds PMD as an analysis option and related command-line flag |
| .codacy/codacy.yaml | Updates Codacy configuration to include PMD |
Files not reviewed (3)
- .cursor/rules/cursor.mdc: Language not supported
- tools/testdata/repositories/pmd/expected.sarif: Language not supported
- tools/testdata/repositories/pmd/pmd-ruleset.xml: Language not supported
Comments suppressed due to low confidence (1)
utils/download.go:24
- The file existence check using os.IsExist may be incorrect. Instead, consider using 'if errInfo == nil' to verify that the file exists.
if errInfo != nil && os.IsExist(errInfo) {
zhamborova
left a comment
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.
lgtm
cad32d2 to
7264dcd
Compare
tested locally ✅