1
- # unified-diff [ ![ Build Status] [ travis-badge ]] [ travis ] [ ![ Coverage Status] [ codecov-badge ]] [ codecov ]
2
-
3
- [ Unified] [ ] plugin to ignore unrelated messages. Currently works in
4
- PRs on Travis.
5
-
6
- When working with natural language, having tools that check cumbersome
7
- tasks can be very useful (think [ alex] [ ] or [ retext] [ ] plugins). However,
8
- natural language isn’t as strict as code. Integrating natural language
9
- checking in a CI often doesn’t work well due to false positives.
1
+ # unified-diff
2
+
3
+ [ ![ Build] [ build-badge ]] [ build ]
4
+ [ ![ Coverage] [ coverage-badge ]] [ coverage ]
5
+ [ ![ Downloads] [ downloads-badge ]] [ downloads ]
6
+ [ ![ Sponsors] [ sponsors-badge ]] [ collective ]
7
+ [ ![ Backers] [ backers-badge ]] [ collective ]
8
+ [ ![ Chat] [ chat-badge ]] [ chat ]
9
+
10
+ [ ** unified** ] [ unified ] plugin to ignore unrelated messages.
11
+ Currently works in PRs on Travis.
12
+
13
+ When working with natural language, having tools that check cumbersome tasks
14
+ can be very useful (think [ alex] [ ] or [ retext] [ ] plugins).
15
+ However, natural language isn’t as strict as code.
16
+ Integrating natural language checking in a CI often doesn’t work well due to
17
+ false positives.
10
18
It’s possible to add a long list of exceptions, but this soon becomes
11
19
unmanageable.
12
20
13
- This plugin solves that problem, when in Travis, by ignoring any
14
- messages on unchanged lines. When run outside Travis, this plugin
15
- doesn’t do anything.
16
-
17
- ###### TODO
18
-
19
- * [ ] Add support for other CIs (ping if you want to work on this);
20
- * [ ] Add non-CI support (I’m not yet sure how though).
21
+ This plugin solves that problem, when in Travis, by ignoring any messages on
22
+ unchanged lines.
23
+ When run outside Travis, this plugin doesn’t do anything.
21
24
22
- ## Installation
25
+ ## Install
23
26
24
- [ npm] [ npm-install ] :
27
+ [ npm] [ ] :
25
28
26
- ``` bash
29
+ ``` sh
27
30
npm install unified-diff
28
31
```
29
32
30
- ## Usage
33
+ ## Use
31
34
32
- Say we have this ` readme.md ` . Note the ` an an ` .
35
+ Say we have this ` readme.md ` .
36
+ Note the ` an an ` .
33
37
34
- ``` md
38
+ ``` markdown
35
39
This is an an example.
36
40
```
37
41
@@ -94,8 +98,7 @@ script:
94
98
```
95
99
96
100
When run in Travis, we’ll see the following printed on ** stderr** (4).
97
- Note that ` an an ` on L1 is not included because it’s unrelated to this
98
- PR.
101
+ Note that ` an an ` on L1 is not included because it’s unrelated to this PR.
99
102
100
103
``` txt
101
104
readme.md
@@ -119,42 +122,71 @@ index 360b225..5a96b86 100644
119
122
+ Some more text. An error.
120
123
```
121
124
122
- This time our lint task exits successfully, even though L1 would
123
- normally emit an error, but it’s unrelated to the PR.
125
+ This time our lint task exits successfully, even though L1 would normally emit
126
+ an error, but it’s unrelated to the PR.
124
127
125
128
## API
126
129
127
130
### ` processor.use(diff) `
128
131
129
- Ignore messages emitted by plugins before ` diff ` for lines that did
130
- not change.
132
+ Ignore messages emitted by plugins before ` diff ` for lines that did not change.
131
133
132
- There are no options. If there’s a ` TRAVIS_COMMIT_RANGE ` environment
133
- variable this plugin runs, otherwise it’s a noop.
134
+ There are no options.
135
+ If there’s a ` TRAVIS_COMMIT_RANGE ` environment variable this plugin runs,
136
+ otherwise it’s a noop.
137
+
138
+ ###### TODO
139
+
140
+ * [ ] Add support for other CIs (ping if you want to work on this)
141
+ * [ ] Add non-CI support (I’m not yet sure how though)
134
142
135
143
## Contribute
136
144
137
- See [ ` contributing.md ` in ` unifiedjs/unified ` ] [ contributing ] for ways to get
138
- started.
145
+ See [ ` contributing.md ` ] [ contributing ] in [ ` unifiedjs/.github ` ] [ health ] for ways
146
+ to get started.
147
+ See [ ` support.md ` ] [ support ] for ways to get help.
139
148
140
- This organisation has a [ Code of Conduct] [ coc ] . By interacting with this
141
- repository, organisation, or community you agree to abide by its terms.
149
+ This project has a [ Code of Conduct] [ coc ] .
150
+ By interacting with this repository, organisation, or community you agree to
151
+ abide by its terms.
142
152
143
153
## License
144
154
145
155
[ MIT] [ license ] © [ Titus Wormer] [ author ]
146
156
147
157
<!-- Definitions -->
148
158
149
- [ travis-badge ] : https://img.shields.io/travis/unifiedjs/unified-diff.svg
159
+ [ build-badge ] : https://img.shields.io/travis/unifiedjs/unified-diff.svg
160
+
161
+ [ build ] : https://travis-ci.org/unifiedjs/unified-diff
162
+
163
+ [ coverage-badge ] : https://img.shields.io/codecov/c/github/unifiedjs/unified-diff.svg
164
+
165
+ [ coverage ] : https://codecov.io/github/unifiedjs/unified-diff
150
166
151
- [ travis ] : https://travis-ci.org/unifiedjs/ unified-diff
167
+ [ downloads-badge ] : https://img.shields.io/npm/dm/ unified-diff.svg
152
168
153
- [ codecov-badge ] : https://img.shields.io/codecov/c/github/unifiedjs/ unified-diff.svg
169
+ [ downloads ] : https://www.npmjs.com/package/ unified-diff
154
170
155
- [ codecov ] : https://codecov.io/github/unifiedjs/unified-diff
171
+ [ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
156
172
157
- [ npm-install ] : https://docs.npmjs.com/cli/install
173
+ [ backers-badge ] : https://opencollective.com/unified/backers/badge.svg
174
+
175
+ [ collective ] : https://opencollective.com/unified
176
+
177
+ [ chat-badge ] : https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
178
+
179
+ [ chat ] : https://spectrum.chat/unified
180
+
181
+ [ npm ] : https://docs.npmjs.com/cli/install
182
+
183
+ [ health ] : https://github.com./unifiedjs/.github
184
+
185
+ [ contributing ] : https://github.com./unifiedjs/.github/blob/master/contributing.md
186
+
187
+ [ support ] : https://github.com./unifiedjs/.github/blob/master/support.md
188
+
189
+ [ coc ] : https://github.com./unifiedjs/.github/blob/master/code-of-conduct.md
158
190
159
191
[ license ] : license
160
192
@@ -165,7 +197,3 @@ repository, organisation, or community you agree to abide by its terms.
165
197
[ alex ] : https://github.com./wooorm/alex
166
198
167
199
[ retext ] : https://github.com./retextjs/retext/blob/master/doc/plugins.md#list-of-plugins
168
-
169
- [ contributing ] : https://github.com./unifiedjs/unified/blob/master/contributing.md
170
-
171
- [ coc ] : https://github.com./unifiedjs/unified/blob/master/code-of-conduct.md
0 commit comments