{"id":13684225,"url":"https://github.com/mathroule/danger-pmd","last_synced_at":"2025-07-07T21:35:00.141Z","repository":{"id":35145643,"uuid":"212690055","full_name":"mathroule/danger-pmd","owner":"mathroule","description":"Danger plugin for PMD","archived":false,"fork":false,"pushed_at":"2024-10-28T18:40:38.000Z","size":126,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T03:35:41.218Z","etag":null,"topics":["danger","danger-plugin","pmd"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathroule.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-03T22:09:43.000Z","updated_at":"2024-10-28T18:40:40.000Z","dependencies_parsed_at":"2024-10-08T23:10:43.897Z","dependency_job_id":"96808464-f613-4b52-af78-6155103960d4","html_url":"https://github.com/mathroule/danger-pmd","commit_stats":{"total_commits":109,"total_committers":4,"mean_commits":27.25,"dds":0.4036697247706422,"last_synced_commit":"2be2ec72b2fc5e37873ac106df4b1f27a833bdde"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/mathroule/danger-pmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathroule%2Fdanger-pmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathroule%2Fdanger-pmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathroule%2Fdanger-pmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathroule%2Fdanger-pmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathroule","download_url":"https://codeload.github.com/mathroule/danger-pmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathroule%2Fdanger-pmd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261007318,"owners_count":23096204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["danger","danger-plugin","pmd"],"created_at":"2024-08-02T14:00:31.179Z","updated_at":"2025-07-07T21:35:00.098Z","avatar_url":"https://github.com/mathroule.png","language":"Ruby","readme":"# Danger PMD\n[![Latest release](https://img.shields.io/github/v/release/mathroule/danger-pmd.svg)](https://github.com/mathroule/danger-pmd/releases/latest) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Deploy](https://github.com/mathroule/danger-pmd/workflows/Deploy/badge.svg)](https://github.com/mathroule/danger-pmd/actions) [![codecov](https://codecov.io/gh/mathroule/danger-pmd/branch/main/graph/badge.svg?token=HYA9XW0GL5)](https://codecov.io/gh/mathroule/danger-pmd)\n\nChecks on your Gradle project's Java source files.\nThis is done using [PMD](https://pmd.github.io)\nResults are passed out as tables in markdown.\n\nThis plugin is inspired from https://github.com/kazy1991/danger-findbugs.\n\n## Installation\n\n    $ gem install danger-pmd\n\n## Usage\n\n    Methods and attributes from this plugin are available in\n    your `Dangerfile` under the `pmd` namespace.\n\n\u003cblockquote\u003eRunning PMD with its basic configuration\n  \u003cpre\u003e\npmd.report\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n\u003cblockquote\u003eRunning PMD with a specific Gradle task or report file (glob accepted)\n  \u003cpre\u003e\npmd.gradle_task = 'module:pmd' # default: 'pmd'\npmd.report_file = 'module/build/reports/pmd/pmd.xml' # default: 'app/build/reports/pmd/pmd.xml'\npmd.report\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n\u003cblockquote\u003eRunning PMD with a specific root path\n  \u003cpre\u003e\npmd.root_path = '/Users/developer/project' # default: result of `git rev-parse --show-toplevel`\npmd.report\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n\u003cblockquote\u003eRunning PMD with an array of report files (glob accepted)\n  \u003cpre\u003e\npmd.report_files = ['modules/**/build/reports/pmd/pmd.xml', 'app/build/reports/pmd/pmd.xml']\npmd.report\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n\u003cblockquote\u003eRunning PMD without running a Gradle task\n  \u003cpre\u003e\npmd.skip_gradle_task = true # default: false\npmd.report\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n\u003cblockquote\u003eRunning PMD without inline comment\n  \u003cpre\u003e\npmd.report(inline_mode: false) # default: true\n  \u003c/pre\u003e\n\u003c/blockquote\u003e\n\n#### Attributes\n\n`gradle_task` - Custom Gradle task to run.\nThis is useful when your project has different flavors.\nDefaults to \"pmd\".\n\n`skip_gradle_task` - Skip Gradle task.\nIf you skip Gradle task, for example project does not manage Gradle.\nDefaults to `false`.\n\n`root_path` - An absolute path to a root.\nTo comment errors to VCS, this needs to know relative path of files from the root.\nDefaults to result of \"git rev-parse --show-toplevel\".\n\n`report_file` - Location of report file.\nIf your pmd task outputs to a different location, you can specify it here.\nDefaults to \"app/build/reports/pmd/pmd.xml\".\n\n`report_files` - Location of report files.\nIf your pmd task outputs to a different location, you can specify it here.\nDefaults to ['app/build/reports/pmd/pmd.xml'].\n\n#### Methods\n\n`report` - Calls PMD task of your Gradle project.\nIt fails if `gradlew` cannot be found inside current directory.\nIt fails if `report_file` cannot be found inside current directory.\nIt fails if `report_files` is empty.\n\n`gradle_task` - A getter for `gradle_task`, returning Gradle task report.\n\n`skip_gradle_task` - A getter for `skip_gradle_task`.\n\n`root_path` - A getter for `root_path`.\n\n`report_file` - A getter for `report_file`.\n\n`report_files` - A getter for `report_files`.\n\n## Development\n\n1. Clone this repo\n2. Run `bundle install` to setup dependencies.\n3. Run `bundle exec rake spec` to run the tests.\n4. Use `bundle exec guard` to automatically have tests run as you make changes.\n5. Make your changes.\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Ruby (danger)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathroule%2Fdanger-pmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathroule%2Fdanger-pmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathroule%2Fdanger-pmd/lists"}