Weitere ähnliche Inhalte
Ähnlich wie DocumentValidator (7)
Mehr von Takahiko Ito (6)
Kürzlich hochgeladen (11)
DocumentValidator
- 11. 例例:設定⽅方法
<configuration name="Validator”>
<component name="SentenceIterator”>
<component name="SentenceLength”>
<property name="max_length" value="50"/>
</component>
<component name="InvalidExpression">
<property name="dictionary" value="dic/invalid_word.dic"/>
< /component>
<component name="SpaceAfterPeriod" />
<component name="InvalidCharacter" />
<component name="SpaceWithSymbol" />
</component>
<component name="SectionLength">
<property name="max_char_number" value="50"/>
</component>
<component name=“ParagraphNumber" />
</configuration>
文の長さをチェック。
シンボルの前後にスペー
スがあるかをチェック
使うべきでない文字が使
用されているかをチェッ
ク
- 12. 参考: CheckStyle の設定ファイル
<module name="Checker">
<module name="JavadocPackage"/>
<module name="NewlineAtEndOfFile"/>
<module name="Translation"/>
<module name="FileLength"/>
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="RegexpSingleline">
<property name="format" value="s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
</module>
- 13. サポートしている Validator
• ⼀一⾏行行単位の Validator
– SentenceLength
– CommaNumber
– InvalidWord, InvalidExpression
– SuggestExpression
– SentenceStartWith
– WordNumber
– WhiteSpace
– SimbolValidator
• Section 単位の Validator
– ParagraphLength
– ParagraphNumber
– ParagraphStartWith
- 16. 今後の予定
• Validator のプラグイン化
• サーバー化 & UI 追加
• 抑制アノテーション
• ⾔言語毎に実装が異異なる Validator を加える
– 英語の三⼈人称単数現在、時制、代名詞
• ⾔言語毎の設定テンプレート
• Eclipse、IntelliJ IDEA から利利⽤用したい
• サポートする⽂文書フォーマットの拡充: RST、
MarkDown