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

checkstyle-formatter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkstyle-formatter

Simple Checkstyle data formatter

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
increased by3.18%
Maintainers
1
Weekly downloads
 
Created
Source

checkstyle-formatter

Simple Checkstyle data formatter. Formats data to an XML string, leaving the reporting details to the user.

npm Version Build Status Test Coverage Dependency Status

Installation

Install using npm:

$ npm install checkstyle-formatter

Usage

var checkstyleFormatter = require('checkstyle-formatter');
var results = [
    {
        filename: 'foo.js',
        messages: [
            {
                line: 1,
                column: 2,
                severity: 'warning',
                message: 'the quick'
            },
            {
                line: 3,
                column: 4,
                severity: 'error',
                message: 'brown fox'
            }
        ]
    },
    {
        filename: 'bar.js',
        messages: [
            {
                line: 5,
                column: 6,
                severity: 'warning',
                message: 'jumped over'
            },
            {
                line: 7,
                column: 8,
                severity: 'error',
                message: 'the lazy dog'
            }
        ]
    }
];

console.log(checkstyleFormatter(results));
// <?xml version="1.0" encoding="utf-8"?>
// <checkstyle version="4.3">
// <file name="foo.js">
// <error line="1" column="2" severity="warning" message="the quick" />
// <error line="3" column="4" severity="error" message="brown fox" />
// </file>
// <file name="bar.js">
// <error line="5" column="6" severity="warning" message="jumped over" />
// <error line="7" column="8" severity="error" message="the lazy dog" />
// </file>
// </checkstyle>

Changelog

1.1.0
  • Add support for optional source information
1.0.0
  • Initial release

License

MIT

Keywords

FAQs

Package last updated on 02 Sep 2017

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