service:
type: github
token: token
from: user name
pipeline:
- stage_name: command_stage_1
test do | |
system "#{bin}/redpen", "-version" | |
file_name = "sampledoc-en.txt" | |
path = "#{libexec}/sample-doc/en/#{file_name}" | |
output = `#{bin}/redpen -c #{libexec}/conf/redpen-conf-en.xml #{path}` | |
errors = output.split("\n").select { |line| line.start_with?(file_name) } | |
assert errors.find{|e|(e.start_with?("#{file_name}:1: ValidationError[SymbolWithSpace]"))} | |
end |
Load the environment variable to the Walter configuration files.
We follow the format of environment varibale as the discussion in terraform
messenger:
type: ${env.MESSENGER_TYPE}
{ | |
"document": "Theyre is a blak rownd borl.", | |
"format": "json2", | |
"documentParser": "PLAIN", | |
"config": { | |
"lang" : "en", | |
"validators" : { | |
"CommaNumber": {}, | |
"Contraction": {}, | |
"DoubledWord": {}, |
Writers want to suppress errors from RedPen. In such cases, writers list up the error types they want to suppress. The list of the errors are written down to the beginning of sections or paragraphs where they want to suppress the spcified errors.
The following is a sample of AsciiDoc section which suppress two error types. In the section, the specified errors are suppressed even when RedPen detect errors.
<redpen-conf lang="en">
<validators>
<validator name="SentenceLength" level="warn" >
<property name="max_len" value="200"/>
</validator>
<validator name="InvalidSymbol" level="info" />
<validator name="SpaceWithSymbol" level="error" />
<validator name="SectionLength">