redpen-cc / redpen

RedPen is an open source proofreading tool to check if your technical documents meet the writing standard. RedPen supports various markup text formats (Markdown, Textile, AsciiDoc, Re:VIEW, reStructuredText and LaTeX).
https://redpen.cc
Apache License 2.0
567 stars 74 forks source link

Enable black-listing (disabling) validators #815

Closed NicolasWebDev closed 6 years ago

NicolasWebDev commented 6 years ago

From what I have understood from the documentation, so far it is only possible to enable a list of validators (white-listing) or all of them.

I think it would be nice to have a way to disable specific validators, for example, if I want all of them enabled but for Hyphenation.

takahi-i commented 6 years ago

Hello @NicolasWebDev,

Thank you very much for the interest in RedPen!

RedPen command (redpen) applies validators in default setting file. The following is the default setting file.

https://github.com/redpen-cc/redpen/blob/master/redpen-cli/sample/conf/redpen-conf-en.xml

We can specify the setting file which fits your writing standard to redpen command.

For example, when you save the following setting naming my-redpen-conf.xml which only have SentenceLength Validator.

<redpen-conf lang="en">
    <validators>
        <validator name="SentenceLength">
            <property name="max_len" value="120"/>
        </validator>
</redpen-conf>

And then run redpen command with -c option. For example the following command just check the length of the input sentences.

repden -c my-redpen-conf.xml input.md

For more details, please see http://redpen.cc/docs/latest/index.html#configuration-file.

takahi-i commented 6 years ago

I close this issue. Please reopen it when you have further questions @NicolasWebDev.