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
569 stars 74 forks source link

Add relative path of input files in output format #870

Closed takahi-i closed 4 years ago

takahi-i commented 4 years ago

Ref #869

I make the output formatter have not only input file name but also the paths. The following is an example of the changes.

Is this work for you @tsuyoshicho ?

$ bin/redpen sample-doc/en/sampledoc-en.md
...
[2020-01-03 23:17:09.819][INFO ] cc.redpen.validator.JavaScriptValidator - JavaScript validators directory: js
sample-doc/en/sampledoc-en.md:3: ValidationError[SentenceLength], The length of the sentence (195) exceeds the maximum of 120. at line: Some software tools work in more than one machine, and such distributed (cluster)systems can handle huge data or tasks, because such software tools make use of large amount of computer resources.
sample-doc/en/sampledoc-en.md:3: ValidationError[SymbolWithSpace], Need whitespace after symbol ")". at line: Some software tools work in more than one machine, and such distributed (cluster)systems can handle huge data or tasks, because such software tools make use of large amount of computer resources.
sample-doc/en/sampledoc-en.md:4: ValidationError[SuccessiveWord], Found word "the" repeated twice in succession. at line:  for example, each instance in distributed search engines stores the the fractions of data.
sample-doc/en/sampledoc-en.md:4: ValidationError[EndOfSentence], Found invalid end of sentence "".". at line:  In this article, we'll call a computer server that works as a member of a cluster an "instance".

[2020-01-03 23:17:09.837][ERROR] cc.redpen.Main - The number of errors "4" is larger than specified (limit is "1").
tsuyoshicho commented 4 years ago

Good it. 😄

tsuyoshicho commented 4 years ago

I tried work with reviewdog(errorfomat util)

Work is fine, OK.

see below:

takahi-i commented 4 years ago

Fascinating! I will merge this PR and release a new version.