Skip to content

Commit

Permalink
Restructure to meet vale style guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisChinchilla committed Jan 26, 2021
1 parent 366c925 commit a686522
Show file tree
Hide file tree
Showing 49 changed files with 150 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: python
cache: bundler
python:
- "3.6"
install:
# Install the latest release of Vale:
- wget https://github.com/errata-ai/vale/releases/download/v2.0.0-beta.2/vale_2.0.0-beta.2_Linux_64-bit.tar.gz
- mkdir bin && tar -xvzf vale_2.0.0-beta.2_Linux_64-bit.tar.gz -C bin
- export PATH=./bin:"$PATH"

- bundle install --jobs=3

- pip install yamllint
- pip install markdata
- pip install pyyaml
before_script:
- yamllint -c '.yamllint.yml' Openly
script:
- cucumber
- zip -r Openly.zip Openly -x "*.DS_Store"
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: Openly.zip
skip_cleanup: true
on:
tags: true
8 changes: 8 additions & 0 deletions .yamllint.yml
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
6 changes: 0 additions & 6 deletions Ages.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Change Log

<!-- TODO -->
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'aruba', '~> 0.14.3'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion FutureTense.yml → Openly/FutureTense.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
extends: existence
message: "Possible future tense."
ignorecase: true
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion HeadingsPunctuation.yml → Openly/HeadingsPunctuation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
extends: existence
message: Do not use '%s' at the end of headings
link: https://github.com/cockroachdb/docs/blob/master/STYLE.md#capitalization-and-punctuation
link: https://github.com/Openly/docs/blob/master/STYLE.md#capitalization-and-punctuation
scope: heading
level: warning
raw:
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions Openly/Hyphens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
extends: substitution
message: Use '%s' instead of '%s'
level: warning
swap:
African-American: African American
Asian-American: Asian American
All American: All-American
'campus(?:-|\s)wide': campuswide
'college(?:-|\s)wide': collegewide
'state(?:-|\s)wide': statewide
'world(?:-|\s)wide': worldwide
'change(?:-|\s)maker': change maker
e-mail: email
game-changer: game changer
Native-American: Native American
right click: right-click
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tech-terms/devops.txt → Openly/tech-terms/devops.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
kubernetes
k8s
kustomize
kubectl
docker
rkt
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions Openly/tech-terms/tech-slang.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
n00b
livestream
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ linters
documentarian
markdown
onboarding
readme
readme
snagit
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Openly - Open source Grammarly

This is a series of Vale styles to attempt to emulate some features of the commercial, and closed source, Grammarly. More to come.
A Vale linter style that attempts to emulate some features of the commercial, and closed source, Grammarly. More to come.

__Not complete, and WIP, contributions welcome__.😁


[![Build Status](https://travis-ci.org/testthedocs/Openly.svg?branch=master)](https://travis-ci.org/testthedocs/Openly) ![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)

This repository contains a [Vale-compatible](https://github.com/errata-ai/vale) that attempts to emulate some features of the commercial, and closed source, Grammarly. More to come.

## Getting Started

> :exclamation: Requires Vale >= **1.7.0**. :exclamation:
Download the [latest release](https://github.com/testthedocs/Openly/releases), copy the "Openly" 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 = Openly
```

See [Usage](https://github.com/errata-ai/vale/#usage) for more information.
14 changes: 14 additions & 0 deletions features/rules.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Feature: Rules

Scenario: Basic test case
When I test "basic"
Then the output should contain exactly:
"""
fail.md:3:7:Openly.Terminology:Prefer 'Openly' over 'Openly'
fail.md:3:19:Openly.Hyperbolic:Consider removing 'just'
fail.md:3:36:Openly.Spelling:Did you really mean 'eg'?
fail.md:3:36:Openly.Abbreviations:Use 'e.g.,' instead of 'eg'
fail.md:3:42:Openly.Spelling:Did you really mean 'ie'?
fail.md:3:42:Openly.Abbreviations:Use 'i.e.,' instead of 'ie'
fail.md:5:17:Openly.Spelling:Did you really mean 'spulling'?
"""
6 changes: 6 additions & 0 deletions features/steps.rb
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
1 change: 1 addition & 0 deletions features/support/aruba.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'aruba/cucumber'
6 changes: 6 additions & 0 deletions fixtures/basic/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = ../../

MinAlertLevel = suggestion

[*.md]
BasedOnStyles = Openly
13 changes: 13 additions & 0 deletions fixtures/basic/fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# HEADINGS!

So, click the button to see what the computer thinks they will say. There is also right click of course. This is true.

But I'm telling you the truth is that it has the manpower and knows and arguably tries to assist you.

And don't just link [here](#)

What is eg? Do you mean example or two thirds of an egg? And you have to use "american quotes". Talking of quotes, we don't mind if you use "dumb" ones, or “smart” ones but keep it consistent.

And try to keep your prose short, not have really really really long passages that go on and on for no real reason apart from to use lots of words.

Don't make spulling mistakes, but certain technical terms such as nuget or linter are fine.
13 changes: 13 additions & 0 deletions fixtures/basic/pass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Headings

Click the button to see what the computer thinks. You can also use right click of course. This is true.

But I'm telling you the truth is that it has the manpower and knows and arguably tries to assist you.

Here is a link that [links to the documentation](#)

What is e.g.? Do you mean example or two thirds of an egg? And you have to use "American quotes." Talking of quotes, we don't mind if you use "dumb" ones, or "smart" ones but keep it consistent.

And try to keep your prose short.

Don't make spelling mistakes, but certain technical terms such as nuget or linter are fine.
6 changes: 6 additions & 0 deletions fixtures/basic/real.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Hi.

We'd like to hire an excellent java script guy, please.
If you're good at javascript then please apply.

Thank you.
1 change: 0 additions & 1 deletion tech-terms/tech-slang.txt

This file was deleted.

0 comments on commit a686522

Please sign in to comment.