-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
167 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
language: python | ||
cache: bundler | ||
python: | ||
- "3.6" | ||
install: | ||
# Install the latest release of Vale: | ||
- go get github.com/errata-ai/vale | ||
|
||
- bundle install --jobs=3 | ||
|
||
- pip install yamllint | ||
- pip install markdata | ||
- pip install pyyaml | ||
before_script: | ||
- yamllint -c '.yamllint.yml' proselint | ||
script: | ||
- cucumber | ||
- zip -r proselint.zip proselint -x "*.DS_Store" | ||
deploy: | ||
provider: releases | ||
api_key: $GITHUB_TOKEN | ||
file: proselint.zip | ||
skip_cleanup: true | ||
on: | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rules: | ||
# We only include a single document (without directives) in our rules, so | ||
# the extra markup is unnecessary. | ||
document-start: disable | ||
# Many rules include a `link` key that can be relatively long. | ||
# | ||
# TODO: Should we change this? | ||
line-length: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'aruba', '~> 0.14.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
# proselint | ||
# proselint [![Build Status](https://travis-ci.org/errata-ai/proselint.svg?branch=master)](https://travis-ci.org/errata-ai/proselint) ![Vale version](https://img.shields.io/badge/vale-%3E%3D%20v1.7.0-blue.svg) ![license](https://img.shields.io/github/license/mashape/apistatus.svg) | ||
|
||
> [`proselint`](https://github.com/amperser/proselint/) places the world’s greatest writers and editors by your side, where they whisper suggestions on how to improve your prose. | ||
This repository contains a [Vale-compatible](https://github.com/errata-ai/vale) implementation of the guidelines enforced by the `proselint` ([LICENSE](https://github.com/amperser/proselint/blob/master/LICENSE.md)) linter. | ||
|
||
## Getting Started | ||
|
||
> :exclamation: proselint requires Vale >= **1.7.0**. :exclamation: | ||
Download the [latest release](https://github.com/errata-ai/proselint/releases), copy the "proselint" directory to your `StylesPath`, and include it in your configuration file: | ||
|
||
```ini | ||
# This goes in a file named either `.vale.ini` or `_vale.ini`. | ||
StylesPath = path/to/some/directory | ||
MinAlertLevel = warning # suggestion, warning or error | ||
|
||
# Only Markdown and .txt files; change to whatever you're using. | ||
[*.{md,txt}] | ||
# List of styles to load. | ||
BasedOnStyles = proselint | ||
``` | ||
|
||
See [Usage](https://github.com/errata-ai/vale/#usage) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Feature: Rules | ||
|
||
Scenario: Cliches | ||
When I test "basic" | ||
Then the output should contain exactly: | ||
""" | ||
test.md:1:19:proselint.Nonwords:Consider using 'regardless' instead of 'irregardless'. | ||
test.md:3:18:proselint.Archaisms:'perchance' is archaic. | ||
test.md:7:6:proselint.Cliches:'a chip off the old block' is a cliche. | ||
test.md:9:12:proselint.Cliches:'a fate worse than death' is a cliche. | ||
test.md:11:20:proselint.Spelling:Inconsistent spelling of 'color'. | ||
test.md:11:61:proselint.Spelling:Inconsistent spelling of 'center'. | ||
test.md:13:9:proselint.CorporateSpeak:'circle back around' is corporate speak. | ||
test.md:15:5:proselint.Cursing:Consider replacing 'shit'. | ||
test.md:17:16:proselint.DateCase:With lowercase letters, the periods are standard. | ||
test.md:17:37:proselint.DateSpacing:It's standard to put a space before '7a.m.' | ||
test.md:17:58:proselint.DateMidnight:Use 'midnight' or 'noon'. | ||
test.md:17:81:proselint.DateRedundancy:'a.m.' is always morning; 'p.m.' is always night. | ||
test.md:19:18:proselint.Uncomparables:'most correct' is not comparable | ||
test.md:21:1:proselint.Hedging:'I would argue that' is hedging. | ||
test.md:23:4:proselint.Hyperbole:'exaggerated!!!' is hyperbolic. | ||
test.md:25:14:proselint.Jargon:'in the affirmative' is jargon. | ||
test.md:27:10:proselint.Illusions:'the the' - There's a lexical illusion here. | ||
test.md:29:14:proselint.LGBTOffensive:'fag' is offensive. Remove it or consider the context. | ||
test.md:29:44:proselint.LGBTTerms:Consider using 'sexual orientation' instead of 'sexual preference'. | ||
test.md:31:10:proselint.Malapropisms:'the Infinitesimal Universe' is a malapropism. | ||
test.md:33:1:proselint.Apologizing:Excessive apologizing: 'More research is needed' | ||
test.md:35:1:proselint.But:Do not start a paragraph with a 'but'. | ||
test.md:37:9:proselint.Currency:Incorrect use of symbols in '$10 dollars'. | ||
test.md:39:14:proselint.Oxymorons:'exact estimate' is an oxymoron. | ||
test.md:41:38:proselint.GenderBias:Consider using 'lawyer' instead of 'lady lawyer'. | ||
test.md:43:11:proselint.Skunked:'impassionate' is a bit of a skunked term — impossible to use without issue. | ||
test.md:45:21:proselint.DenizenLabels:Did you mean 'Hong Konger'? | ||
test.md:47:13:proselint.AnimalLabels:Consider using 'avine' instead of 'bird-like'. | ||
test.md:49:20:proselint.Typography:Consider using the '©' symbol instead of '(C)'. | ||
test.md:49:40:proselint.Typography:Consider using the '™' symbol instead of '(tm)'. | ||
test.md:49:56:proselint.Typography:Consider using the '®' symbol instead of '(R)'. | ||
test.md:49:79:proselint.Typography:Consider using the '×' symbol instead of '2 x 2'. | ||
test.md:51:27:proselint.Diacritical:Consider using 'Beyoncé' instead of 'Beyonce'. | ||
test.md:51:36:proselint.P-Value:You should use more decimal places, unless 'p = 0.00' is really true. | ||
test.md:51:47:proselint.Needless:Prefer 'abolition' over 'abolishment' | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmd = 'vale --output=line --sort --normalize --relative' | ||
|
||
When(/^I test "(.*)"$/) do |rule| | ||
step %(I cd to "../../fixtures/#{rule}") | ||
step %(I run `#{cmd} .`) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'aruba/cucumber' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
StylesPath = ../../ | ||
|
||
MinAlertLevel = suggestion | ||
|
||
[*.md] | ||
BasedOnStyles = proselint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
The test was good irregardless. | ||
|
||
I want to sleep, perchance to dream. | ||
|
||
It's a matter of concern. | ||
|
||
He's a chip off the old block. | ||
|
||
Worse than a fate worse than death. | ||
|
||
Painting colour on color. The centre of the arts is the art center. | ||
|
||
We will circle back around to it. | ||
|
||
Bad shit in this phrase. The QB is named ball licker. | ||
|
||
It happened at 7 am. It happened at 7a.m. It happened at 12 a.m. It happened at 7 a.m. in the morning. | ||
|
||
This sentence is most correct. | ||
|
||
I would argue that this is a good test. | ||
|
||
So exaggerated!!! | ||
|
||
I agree it's in the affirmative. | ||
|
||
Paris in the the springtime. | ||
|
||
I once met a fag. I once met a gay man. My sexual preference is for women. | ||
|
||
Found in the Infinitesimal Universe. | ||
|
||
More research is needed. | ||
|
||
But I never start with the word "but". | ||
|
||
It cost $10 dollars. | ||
|
||
He needed an exact estimate. | ||
|
||
The legal team had two lawyers and a lady lawyer. | ||
|
||
I gave an impassionate defence of the situation. | ||
|
||
He was definitely a Hong Kongite. | ||
|
||
It was some bird-like creature. | ||
|
||
Show me the money! (C) The Fresh Maker (tm) Just Do It (R) It is obvious that 2 x 2 = 4 | ||
|
||
He saw the performance by Beyonce (p = 0.00). abolishment is a needless variant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters