com.puppycrawl.tools.checkstyle.checks
Class TranslationCheck
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
com.puppycrawl.tools.checkstyle.checks.TranslationCheck
- All Implemented Interfaces:
- Configurable, Contextualizable, FileSetCheck
- public class TranslationCheck
- extends AbstractFileSetCheck
The TranslationCheck class helps to ensure the correct translation of code by
checking property files for consistency regarding their keys.
Two property files describing one and the same context are consistent if they
contain the same keys.
An example of how to configure the check is:
<module name="Translation"/>
- Author:
- Alexandra Bunge, lkuehne
Method Summary |
void |
process(File[] aFiles)
This method searches for property files in the specified file array
and checks whether the key usage is consistent. |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck |
destroy, filter, fireErrors, getCharset, getMessageCollector, getMessageDispatcher, log, log, setCharset, setFileExtensions, setMessageDispatcher |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setSeverity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TranslationCheck
public TranslationCheck()
- Creates a new
TranslationCheck
instance.
process
public void process(File[] aFiles)
- This method searches for property files in the specified file array
and checks whether the key usage is consistent.
Two property files which have the same prefix should use the same
keys. If this is not the case the missing keys are reported.
- Parameters:
aFiles
- the files to be audited.- See Also:
FileSetCheck