![JAR search and dependency download from the Maven repository](/logo.png)
nu.validator.maven.plugin.configuration.ValidatorCfg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vnu-maven-plugin Show documentation
Show all versions of vnu-maven-plugin Show documentation
Maven plugin to validate HTML / CSS / SVG files with the NU HTML Checker (v.NU, https://validator.github.io/validator/)
The newest version!
/*
* Copyright (c) 2020 Nicolai Ehemann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package nu.validator.maven.plugin.configuration;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.plugins.annotations.Parameter;
/**
*
* @author Nicolai Ehemann, 2020-09-03
*/
public class ValidatorCfg {
public enum WarningConfig {
WARN,
ERROR,
IGNORE
}
/**
* Force document type. Possible values:
*
* - HTML
* - CSS
* - SVG
* - XHTML
*
* @since 1.0.0
*/
@Parameter
private DocumentType forceType;
/**
* How to handle warnings
*
* - WARN (default)
- Show warning
* - IGNORE
- Supress warnings
* - ERROR
- Treat as errors
*
* @since 1.0.0
*/
@Parameter
private WarningConfig warnings = WarningConfig.WARN;
/**
* Filter errors to be filtered by regex
*/
@Parameter
private List filters = new ArrayList<>();
public final DocumentType getForceType() {
return forceType;
}
public final void setForceType(final DocumentType forceType) {
this.forceType = forceType;
}
public final WarningConfig getWarnings() {
return warnings;
}
public final void setWarnings(final WarningConfig warnings) {
this.warnings = warnings;
}
public final List getFilters() {
return filters;
}
public final void setFilters(final List filters) {
this.filters = filters;
}
@Override
public final String toString() {
return "validator{warnings=" + warnings + ", filters=" + filters + '}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy