Code Monkey home page Code Monkey logo

danger-plugin-lint-report's Introduction

danger-plugin-lint-report

Build Status npm version semantic-release

This plugin reads checkstyle / lint 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:

inline comment

Requirements

The plugin does not execute any linter.

Instead, the plugin will search the file tree for lint reports according to the specified file mask and parse them.

The plugin requires a configuration object with a file mask to search for XML reports.

Supported Reports

If you encounter a format that is missing, feel free to add a pull request or open an issue with a sample report attached.

  • Checkstyle 4.3
  • Checkstyle 8.0
  • Android Lint (Format 5)

Usage

Install:

yarn add danger-plugin-lint-report --dev

At a glance:

// dangerfile.js
import { schedule } from 'danger'

const reporter = require("danger-plugin-lint-report")
schedule(reporter.scan({
    fileMask: "**/reports/lint-results.xml",
    reportSeverity: true,
    requireLineModification: true,
}))

Configuration:

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

  /**
   * If set to true, only issues will be reported that are contained in the current changeset (line comparison).
   * If set to false, all issues that are in modified files will be reported.
   */
  requireLineModification: boolean

  /**
   * Optional: Sets a prefix foreach violation message.
   * This can be useful if there are multiple reports being parsed to make them distinguishable.
   */
  outputPrefix?: string
}

Changelog

See the GitHub release history.

For the last couple of changelogs, see the CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

danger-plugin-lint-report's People

Contributors

arhont375 avatar damian-burke avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.