# sort-pmd-rules

> Given a PMD rule set XML file, sort the rules so that you can navigate the file more easily.

Latest version **0.0.0** (published 2016-12-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install sort-pmd-rules
pnpm add sort-pmd-rules
yarn add sort-pmd-rules
bun add sort-pmd-rules
```

Provides the command `sort-pmd-rules`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2016-12-08 |
| First published | 2016-12-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+21 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Hutchison |
| Maintainers | aldaviva |

## Links

- npm: https://www.npmjs.com/package/sort-pmd-rules
- Repository: https://github.com/Aldaviva/sort-pmd-rules
- Homepage: https://github.com/Aldaviva/sort-pmd-rules#readme
- Issues: https://github.com/Aldaviva/sort-pmd-rules/issues
- npm.io page: https://npm.io/package/sort-pmd-rules

## Dependencies (5)

- [xpath](https://npm.io/package/xpath.md) 0.0.23
- [lodash](https://npm.io/package/lodash.md) 3.10.1
- [xmldom](https://npm.io/package/xmldom.md) 0.1.27
- [commander](https://npm.io/package/commander.md) 2.9.0
- [pretty-data](https://npm.io/package/pretty-data.md) 0.40.0

## Recent versions

- 0.0.0 (latest) — 2016-12-08

## README

sort-pmd-rules
============

Given a [PMD rule set XML file](http://pmd.sourceforge.net/pmd-4.3.0/howtomakearuleset.html), sort the rules by their `ref` attributes, so that you can navigate the file more easily.

## Requirements

- [Node.js and NPM](https://nodejs.org/en/)

## Usage

### From the command line

    sudo npm install -g sort-pmd-rules
    sort-pmd-rules -i pmd-rules.xml -o pmd-rules.xml

### Programmatically

	npm install --save sort-pmd-rules

```javascript
var sortPmdRules = require('sort-pmd-rules');

var opts = {
    inputFile: "./pmd-rules.xml",
    outputFile: "./pmd-rules.xml" //optional property
};

sortPmdRules(opts, function(err, sortedRules){
	if(err) throw err;
	console.log(sortedRules);
});
```

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