se.vandmo.textchecker.maven.fixers.AddEndingLineSeparator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of text-checker-maven-plugin Show documentation
Show all versions of text-checker-maven-plugin Show documentation
Maven plugin that checks that text files adheres to certain rules.
package se.vandmo.textchecker.maven.fixers;
import static java.lang.System.lineSeparator;
import static se.vandmo.textchecker.maven.rules.EndsWithLineSeparator.isOk;
import se.vandmo.textchecker.maven.Content;
import se.vandmo.textchecker.maven.Fixer;
public final class AddEndingLineSeparator implements Fixer {
@Override
public void fix(Content content) {
if (!isOk(content.data())) {
content.data(content.data()+lineSeparator());
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy