Open suchow opened 9 years ago
I can read Japanese and am interested in taking this one on!
How do I test a new folder that I put in checks
locally?
If you've cloned the repository and added a new directory to /proselint/checks/
, then add a new line to proselint/.proselintrc
with the name of the module.
And .. how do I actually run my local version of proselint? 😊
python ./proselint test-text.md
?
(Also if there is an IRC/Slack where I can bug you about this, I can do that.)
You can install the local version as a command-line utility by going into the proselint root directory and running python setup.py develop
.
You'll want to first install the requirements pip install -r requirements.txt
.
Then I can use it normally as just proselint
from any directory?
Yes.
And any changes to your local code will automatically be applied when you run proselint
.
One more question: is there a way to easily check a word's capitalization? For instance, if I find jAvAscRIpt
, can I easily tell proselint to fix it to Javascript
?
One way to tell if the capitalization of a word w
is wrong with respect to some standard s
is to check whether the following two conditions hold:
w.lower() == s.lower()
.AND
w != s
.If you have a list of technical words where each is correctly capitalized, you could first use our tools.existence_check()
function with the ignore_case
case flag set to true to find all the words that satisfy condition 1, then test for equality to filter out the non-errors that do not satisfy condition 2.
https://github.com/azu/technical-word-rules