Skip to content
Search for unnecessary or incorrectly written words in your project 🔎
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
excluded_words_lint
tests
.gitignore
.travis.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.md
README.md
setup.cfg
setup.py
tox.ini

README.md

Excluded Words Lint

PyPI version Build Status

Automate the search of unnecessary or incorrectly written words in your project.

Installation

$ pip install excludedwordslint

Usage

excluded-words-lint [OPTIONS] WORDS

Options Description
-e, --extensions TEXT File extensions to consider, separated by commas.
-c, --match_case Matches case sensitive words.
-w, --match_word Matches complete words.
-r, --regex Argument is a custom regular expression.
-p, --path TEXT Changes the root directory.
-t, --throw Throws an exception if some of the words are found.
--help Show this message and exit.

Examples

The examples are based in Jim's Fisher talk Don’t Say “Simply” (Write The Docs 2018).

Search for substrings

Matches any line that contains the substrings "simply" or "simple". It only takes into account files inside "docs" folder with rst or md extensions.

$> excluded-words-lint simply,simple --path 
docs --extensions rst,md 

Search for complete words

Matches any line that contains the word "simply".

$> excluded-words-lint simply --match-word

Search for case sensitive words

Matches any line that contains the word "Simply".

$> excluded-words-lint Simply --match-case

You can use it as well to automate the search of words incorrectly written that does not follow your glossary list of terms.

Correct Inorrect
JavaScript javascript, Javascript, javaScript
TypeScript typescript, TypeScript, typeScript

$> excluded-words-lint javascript,Javascript, javaScript ---match-word --match-case docs --extensions md

Search for words using a custom regular expression

Matches any line that starts with "Simply".

$> excluded-words-lint ^Simply --regex

Import words from a config file

Get an example configuration file here.

$> excluded-words-lint --config=config/.excludedwords

Search for words and throw an error when found

Include the option throw when integrating the command line tool with TravisCI.

$> excluded-words-lint simply --throw

Roadmap

See the open issues for a list of proposed features.

Contributing

Contributions are welcome and appreciated! Check CONTRIBUTING.md file.

License

Copyright (c) 2019 David Garcia (@dgarcia360).

Licensed under MIT license (see LICENSE.md for details)

You can’t perform that action at this time.