Giter Club home page Giter Club logo

devopsotrator / vale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from errata-ai/vale

0.0 0.0 0.0 25.65 MB

:pencil: A syntax-aware linter for prose built with speed and extensibility in mind.

Home Page: https://errata-ai.github.io/vale/

License: MIT License

Dockerfile 0.12% Ruby 1.92% Makefile 1.15% Go 60.47% Gherkin 26.09% Java 0.23% HTML 3.42% CSS 0.29% Scala 0.22% C++ 3.43% TeX 0.63% Haskell 0.45% Rust 0.32% Lua 0.37% PHP 0.16% Python 0.45% R 0.28%

vale's Introduction

Vale: Your Style, Our Editor Build Status Go Report Card Thanks

🌟 We're now offering Integration Assistance! This is a great way to support the project while also getting the time-consuming tasks (e.g., creating a Vale-compatible version of your house style or setting up a CI service) out of the way.

vale-demo

Vale is a natural language linter that supports plain text, markup (Markdown, reStructuredText, AsciiDoc, and HTML), and source code comments. Vale doesn't attempt to offer a one-size-fits-all collection of rules—instead, it strives to make customization as easy as possible.

Check out project website or our blog post to learn more!

Installation

There are a few options to choose from:

  • Homebrew (macOS):

    $ brew tap ValeLint/vale
    $ brew install vale
  • Go:

    $ go get github.com/errata-ai/vale
  • Docker:

    $ docker pull jdkato/vale
  • A Windows Installer package (.msi), which you'll find on the releases page.

  • Manually on Windows, macOS, or Linux by downloading an executable from the releases page.

Plugins for other software

Usage

Using the built-in styles

Vale ships with styles for proselint, write-good, and Joblint. The benefits of using these styles over their original implementations include:

  • Improved support for markup, including the ability to ignore code and target only certain sections of text (e.g., checking headers for a specific capitalization style).
  • No need to install and configure npm (Node.js), pip (Python), or other language-specific tools. With Vale, you get all the functionality in a single, standalone binary available for Windows, macOS, and Linux.
  • Easily combine, mismatch, or otherwise customize each style.

To use one of these styles, you'll need to create a config file alone the lines of the following:

# 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, write-good, Joblint
# Style.Rule = {YES, NO, suggestion, warning, error} to
# enable/disable a rule or change its level.
write-good.E-Prime = NO
Creating your own style

While the built-in styles are useful, Vale is really designed to meet custom needs. This is done by using Vale's extension points (called "checks") that can be customized to perform many different kinds of tasks, including calculating readability, measuring sentence length, and enforcing a particular heading style. See the vale-boilerplate repository for a complete example of using Vale to enforce an external editorial style guide.

Using the CLI

Run Vale on a single file:

$ vale README.md

Run Vale on files matching a particular glob:

# Only lint Markdown and reStructuredText
$ vale --glob='*.{md,rst}' directory

Or exclude files matching a particular glob:

# Ignore all `.txt` files
$ vale --glob='!*.txt' directory

Pipe input to Vale:

$ echo 'this is some very interesting text' | vale

Run Vale on text with an assigned syntax:

$ vale --ext=.md 'this is some `very` interesting text'

See vale --help and Usage for more information.

Say thanks

Hi!

My name is Joseph Kato.

In my spare time, I develop and maintain a few open-source tools for collaborative writing. If you'd like to support my work, you can donate via Square's Cash App or make use of my documentation-related consulting services.

I appreciate the support! Thank you!

vale's People

Contributors

jdkato avatar abingham avatar dsyer avatar wouter-veeken avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.