Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

danger-plugin-lint-report

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger-plugin-lint-report

This plugin reads checkstyle / lint reports and posts issues and violations as inline comments in pull requests.

  • 1.5.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5K
decreased by-35.91%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Contributing

See CONTRIBUTING.md.

Keywords

FAQs

Package last updated on 26 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc