Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vale to Travis CI #1474

Merged
merged 6 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ before_install:
# - npm install

install:
- echo "Install pytest and pip"
- echo "Install Vale, pytest, and pip"
- go get github.com/ValeLint/vale
- pip install -r ci/requirements.txt

before_script:
Expand All @@ -28,5 +29,6 @@ before_script:

script:
- echo "Checking for style guidelines"
- vale --glob='*.{md}' docs
- python -m pytest -n 2

32 changes: 32 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
StylesPath = ci/vale/styles

# The minimum alert level to display (suggestion, warning, or error).
#
# CI builds will only fail on error-level alerts.
MinAlertLevel = warning

# HTML tags to be ignored by Vale. `code` and `tt` are the default, but Linode
# seems to use `strong` in a similar ways -- e.g., `**docker build -t ubuntu**`,
# which could trigger two style issues ("docker" and "ubuntu") but is actually
# a command.
IgnoredScopes = code, strong, tt

# Specifies what Vale considers to be a boundary between words.
WordTemplate = \s(?:%s)\s

[*.md]
# A Linode-specific style (see ci/vale/styles/Linode) that implements spelling
# and capitalization rules.
#
# To add another style, just add it to the `StylesPath` and update the setting
# below (e.g., `BasedOnStyles = Linode, AnotherStyle`).
BasedOnStyles = Linode

# Exclude `{{< file >}}`, `{{< file-excerpt >}}`, `{{< output >}}`,
# and `{{< highlight ... >}}`.
#
# For a description (and unit tests) for these patterns see:
# https://regex101.com/r/m9klBv/3/tests
IgnorePatterns = (?s) *({{< output >}}.*?{{< ?/ ?output >}}), \
(?s) *({{< ?file(?:-excerpt)? [^>]* ?>}}.*?{{< ?/ ?file(?:-excerpt)? ?>}}), \
(?s) *({{< highlight \w+ >}}.*?{{< ?/ ?highlight >}})
Loading