-
Notifications
You must be signed in to change notification settings - Fork 11
[PLUTO-1374] Pmd config #51
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
ee2d8d6 to
de783d7
Compare
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 |
de783d7 to
a685a55
Compare
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 adjusts the PMD integration to use PMD version 6.55.0 and updates related configuration and test logic for generating and verifying SARIF reports as well as PMD ruleset XMLs.
- Updated PMD runner and test files to use the new binary, command line arguments, and output normalization.
- Introduced PMD configuration creation functions and corresponding tests.
- Modified plugin configuration, initialization, and Codacy configuration files to reflect the updated PMD version.
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/pmdRunner_test.go | Updated tests for SARIF output normalization and revised PMD binary path |
| tools/pmdRunner.go | Changed command arguments to align with the new PMD runner expectations |
| tools/pmdConfigCreator_test.go | Added unit tests for generating PMD config XML and verifying disabled rule exclusion |
| tools/pmdConfigCreator.go | Implemented PMD config creation logic using embedded default ruleset XML |
| plugins/tools/pmd/plugin.yaml | Updated download URL and binary path for PMD binary version 6.55.0 |
| cmd/init.go | Integrated PMD configuration generation into the project initialization process |
| .codacy/codacy.yaml | Updated the PMD tool version from 7.12.0 to 6.55.0 |
Files not reviewed (3)
- tools/pmd/default-ruleset.xml: Language not supported
- tools/testdata/repositories/pmd/expected-ruleset.xml: Language not supported
- tools/testdata/repositories/pmd/expected.sarif: Language not supported
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
The PR updates PMD configuration functionality and corrects misspellings and version references across the codebase. Key changes include:
- Renaming the mispelled "ParamenterConfigurations" to "ParameterConfigurations" in multiple files.
- Updating PMD version references from 7.12.0 to 6.55.0 in tests, configuration files, and plugins.
- Adjusting command arguments and file paths for consistent behavior with the updated configurations.
Reviewed Changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/trivyConfigCreator_test.go | Corrected parameter field name spelling in test definitions. |
| tools/trivyConfigCreator.go | Fixed spelling for parameter configurations in the configuration code. |
| tools/pmdRunner_test.go | Updated PMD binary path and error handling for SARIF output. |
| tools/pmdRunner.go | Revised command argument construction for PMD execution. |
| tools/pmdConfigCreator_test.go | Added tests for PMD config creation based on tool configuration. |
| tools/pmdConfigCreator.go | Implemented PMD config generation with proper XML formatting. |
| tools/eslintConfigCreator_test.go | Corrected spelling errors in ESLint config test cases. |
| tools/eslintConfigCreator.go | Fixed parameter configurations spelling in ESLint config creator. |
| tools/ToolConfigurationStruct.go | Updated field name spelling for parameter configurations. |
| plugins/tools/pmd/plugin.yaml | Updated PMD download and binary path information. |
| cmd/init.go | Adjusted PMD version and configuration file creation logic. |
| .codacy/codacy.yaml | Updated PMD version reference for Codacy configuration. |
Files not reviewed (3)
- tools/pmd/default-ruleset.xml: Language not supported
- tools/testdata/repositories/pmd/expected-ruleset.xml: Language not supported
- tools/testdata/repositories/pmd/expected.sarif: Language not supported
machadoit
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.
🚢
test with java repo
codacy-cli-local analyze --tool pmd --rulesets /Users/yasmin/IdeaProjects/codacy-cli-v2/tools/pmd/default-ruleset.xml -o sarif.json --format sarif