danger-plugin-checkstyle
This plugin reads checkstyle reports and posts issues and violations as inline comments in pull requests.
Screenshot of an issue posted as inline comment in a GitHub pull request:
Requirements
The plugin does not execute checkstyle.
Instead, the plugin will search the file tree for checkstyle reports and parse them.
The plugin requires a configuration object with a file mask to search for XML reports.
It is limited to XML checkstyle reports.
Usage
Install:
yarn add danger-plugin-checkstyle --dev
At a glance:
// dangerfile.js
import { schedule } from 'danger'
const checkstyleReport = require("danger-plugin-checkstyle")
schedule(checkstyleReport.scan({
fileMask: "**/reports/checkstyle/*.xml",
reportSeverity: true,
}))
Configuration: ```js interface CheckstyleConfig { /** * File mask used to find XML checkstyle reports. */ fileMask: string
/** * If set to true, the severity will be used to switch between the different message formats (message, warn, fail). */ reportSeverity: boolean } ```
Changelog
See the GitHub release history.
Contributing
See CONTRIBUTING.md.