# checkstyle-formatter

> Simple Checkstyle data formatter

Latest version **1.1.0** (published 2017-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install checkstyle-formatter
pnpm add checkstyle-formatter
yarn add checkstyle-formatter
bun add checkstyle-formatter
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-09-02 |
| First published | 2015-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/checkstyle-formatter) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jim Fitzpatrick |
| Maintainers | jimf |
| Keywords | checkstyle, lint, format, formatter |

## Links

- npm: https://www.npmjs.com/package/checkstyle-formatter
- Repository: https://github.com/jimf/checkstyle-formatter
- Issues: https://github.com/jimf/checkstyle-formatter/issues
- npm.io page: https://npm.io/package/checkstyle-formatter

## Dependencies (1)

- [xml-escape](https://npm.io/package/xml-escape.md) ^1.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-09-02
- 1.0.0 — 2015-06-13

## README

# checkstyle-formatter

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

[![npm Version][npm-badge]][npm]
[![Build Status][build-badge]][build-status]
[![Test Coverage][coverage-badge]][coverage-result]
[![Dependency Status][dep-badge]][dep-status]

## Installation

Install using npm:

    $ npm install checkstyle-formatter

## Usage

```js
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

[build-badge]: https://img.shields.io/travis/jimf/checkstyle-formatter/master.svg
[build-status]: https://travis-ci.org/jimf/checkstyle-formatter
[npm-badge]: https://img.shields.io/npm/v/checkstyle-formatter.svg
[npm]: https://www.npmjs.org/package/checkstyle-formatter
[coverage-badge]: https://img.shields.io/coveralls/jimf/checkstyle-formatter.svg
[coverage-result]: https://coveralls.io/r/jimf/checkstyle-formatter
[dep-badge]: https://img.shields.io/david/jimf/checkstyle-formatter.svg
[dep-status]: https://david-dm.org/jimf/checkstyle-formatter

---
_Source: https://npm.io/package/checkstyle-formatter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
