From b86fcce6212bb7bcd1dec5d5fc510d6c18ba6543 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Thu, 20 Jun 2024 22:47:49 +0200 Subject: [PATCH] Add range type in ignoreVersion --- pom.xml | 6 + versions-common/pom.xml | 6 + .../versions/api/DefaultVersionsHelper.java | 42 ++----- .../versions/api/IgnoreVersionHelper.java | 95 ++++++++++++++++ .../utils/DefaultArtifactVersionCache.java | 2 +- .../versions/api/IgnoreVersionHelperTest.java | 105 ++++++++++++++++++ .../enforcer/MaxDependencyUpdates.java | 2 +- .../pom.xml | 18 +++ .../verify.groovy | 2 + .../src/it/it-encoding-001/verify.bsh | 26 ----- .../src/it/it-encoding-001/verify.groovy | 7 ++ .../mojo/versions/AbstractVersionsReport.java | 2 +- .../versions/AbstractVersionsUpdaterMojo.java | 2 +- .../src/site/markdown/version-rules.md.vm | 19 ++-- versions-model/src/main/mdo/rule.mdo | 15 ++- 15 files changed, 278 insertions(+), 71 deletions(-) create mode 100644 versions-common/src/main/java/org/codehaus/mojo/versions/api/IgnoreVersionHelper.java create mode 100644 versions-common/src/test/java/org/codehaus/mojo/versions/api/IgnoreVersionHelperTest.java delete mode 100644 versions-maven-plugin/src/it/it-encoding-001/verify.bsh create mode 100644 versions-maven-plugin/src/it/it-encoding-001/verify.groovy diff --git a/pom.xml b/pom.xml index 5532b561b6..d2f9c04b4b 100644 --- a/pom.xml +++ b/pom.xml @@ -189,6 +189,12 @@ 1.4.1 provided + + org.apache.maven.resolver + maven-resolver-util + 1.4.1 + + org.eclipse.sisu org.eclipse.sisu.plexus diff --git a/versions-common/pom.xml b/versions-common/pom.xml index 6ba27ef79b..7a14c174ed 100644 --- a/versions-common/pom.xml +++ b/versions-common/pom.xml @@ -82,6 +82,12 @@ javax.inject javax.inject + + + org.apache.maven.resolver + maven-resolver-util + test + org.apache.maven.plugin-testing maven-plugin-testing-harness diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java index 1abc65f201..382348ebb5 100644 --- a/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java +++ b/versions-common/src/main/java/org/codehaus/mojo/versions/api/DefaultVersionsHelper.java @@ -108,10 +108,6 @@ public class DefaultVersionsHelper implements VersionsHelper { private static final String CLASSPATH_PROTOCOL = "classpath"; - private static final String TYPE_EXACT = "exact"; - - private static final String TYPE_REGEX = "regex"; - private static final int LOOKUP_PARALLEL_THREADS = 5; /** @@ -258,8 +254,7 @@ public ArtifactVersions lookupArtifactVersions( try { Collection ignoredVersions = getIgnoredVersions(artifact); if (!ignoredVersions.isEmpty() && getLog().isDebugEnabled()) { - getLog().debug("Found ignored versions: " - + ignoredVersions.stream().map(IgnoreVersion::toString).collect(Collectors.joining(", "))); + getLog().debug("Found ignored versions: " + ignoredVersions + " for artifact" + artifact); } final List repositories; @@ -292,21 +287,7 @@ public ArtifactVersions lookupArtifactVersions( .getVersions() .stream() .filter(v -> ignoredVersions.stream().noneMatch(i -> { - if (TYPE_REGEX.equals(i.getType()) - && Pattern.compile(i.getVersion()) - .matcher(v.toString()) - .matches()) { - if (getLog().isDebugEnabled()) { - getLog().debug("Version " + v + " for artifact " - + ArtifactUtils.versionlessKey(artifact) - + " found on ignore list: " - + i); - } - return true; - } - - if (TYPE_EXACT.equals(i.getType()) - && i.getVersion().equals(v.toString())) { + if (IgnoreVersionHelper.isVersionIgnored(v, i)) { if (getLog().isDebugEnabled()) { getLog().debug("Version " + v + " for artifact " + ArtifactUtils.versionlessKey(artifact) @@ -342,13 +323,12 @@ private List getIgnoredVersions(Artifact artifact) { final List ret = new ArrayList<>(); for (final IgnoreVersion ignoreVersion : ruleSet.getIgnoreVersions()) { - if (!TYPE_EXACT.equals(ignoreVersion.getType()) && !TYPE_REGEX.equals(ignoreVersion.getType())) { + if (IgnoreVersionHelper.isValidType(ignoreVersion)) { + ret.add(ignoreVersion); + } else { getLog().warn("The type attribute '" + ignoreVersion.getType() + "' for global ignoreVersion[" - + ignoreVersion + "] is not valid." + " Please use either '" + TYPE_EXACT + "' or '" - + TYPE_REGEX + + ignoreVersion + "] is not valid. Please use one of '" + IgnoreVersionHelper.VALID_TYPES + "'."); - } else { - ret.add(ignoreVersion); } } @@ -356,11 +336,11 @@ private List getIgnoredVersions(Artifact artifact) { if (rule != null) { for (IgnoreVersion ignoreVersion : rule.getIgnoreVersions()) { - if (!TYPE_EXACT.equals(ignoreVersion.getType()) && !TYPE_REGEX.equals(ignoreVersion.getType())) { - getLog().warn("The type attribute '" + ignoreVersion.getType() + "' for " + rule + " is not valid." - + " Please use either '" + TYPE_EXACT + "' or '" + TYPE_REGEX + "'."); - } else { + if (IgnoreVersionHelper.isValidType(ignoreVersion)) { ret.add(ignoreVersion); + } else { + getLog().warn("The type attribute '" + ignoreVersion.getType() + "' for " + rule + " is not valid." + + " Please use one of '" + IgnoreVersionHelper.VALID_TYPES + "'."); } } } @@ -789,7 +769,7 @@ private static RuleSet enrichRuleSet(Collection ignoredVersions, RuleSet .addAll(ignoredVersions.stream() .map(v -> { IgnoreVersion ignoreVersion = new IgnoreVersion(); - ignoreVersion.setType(TYPE_REGEX); + ignoreVersion.setType(IgnoreVersion.TYPE_REGEX); ignoreVersion.setVersion(v); return ignoreVersion; }) diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/api/IgnoreVersionHelper.java b/versions-common/src/main/java/org/codehaus/mojo/versions/api/IgnoreVersionHelper.java new file mode 100644 index 0000000000..e06510b371 --- /dev/null +++ b/versions-common/src/main/java/org/codehaus/mojo/versions/api/IgnoreVersionHelper.java @@ -0,0 +1,95 @@ +package org.codehaus.mojo.versions.api; + +/* + * Copyright MojoHaus and Contributors + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.regex.Pattern; + +import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +import org.apache.maven.artifact.versioning.VersionRange; +import org.codehaus.mojo.versions.model.IgnoreVersion; +import org.codehaus.mojo.versions.utils.DefaultArtifactVersionCache; +import org.eclipse.aether.version.Version; + +/** + * Helper class for {@link IgnoreVersion} + */ +public class IgnoreVersionHelper { + + static class IgnoreVersionException extends RuntimeException { + IgnoreVersionException(Throwable cause) { + super(cause); + } + } + + public static final List VALID_TYPES = Collections.unmodifiableList( + Arrays.asList(IgnoreVersion.TYPE_EXACT, IgnoreVersion.TYPE_REGEX, IgnoreVersion.TYPE_RANGE)); + + private static final Map> VERSION_MATCHERS; + + static { + VERSION_MATCHERS = new HashMap<>(); + VERSION_MATCHERS.put(IgnoreVersion.TYPE_EXACT, IgnoreVersionHelper::isVersionIgnoredExact); + VERSION_MATCHERS.put(IgnoreVersion.TYPE_REGEX, IgnoreVersionHelper::isVersionIgnoredRegex); + VERSION_MATCHERS.put(IgnoreVersion.TYPE_RANGE, IgnoreVersionHelper::isVersionIgnoredRange); + } + + private IgnoreVersionHelper() {} + + /** + * Check if type for given ignoredVersion is valid. + * + * @param ignoreVersion an ignored version to check + * @return true if type is valid + */ + public static boolean isValidType(IgnoreVersion ignoreVersion) { + return VALID_TYPES.contains(ignoreVersion.getType()); + } + + public static boolean isVersionIgnored(Version version, IgnoreVersion ignoreVersion) { + return VERSION_MATCHERS.get(ignoreVersion.getType()).apply(version, ignoreVersion); + } + + private static boolean isVersionIgnoredExact(Version version, IgnoreVersion ignoreVersion) { + return ignoreVersion.getVersion().equals(version.toString()); + } + + private static boolean isVersionIgnoredRegex(Version version, IgnoreVersion ignoreVersion) { + return Pattern.compile(ignoreVersion.getVersion()) + .matcher(version.toString()) + .matches(); + } + + private static boolean isVersionIgnoredRange(Version version, IgnoreVersion ignoreVersion) { + try { + ArtifactVersion aVersion = DefaultArtifactVersionCache.of(version.toString()); + VersionRange versionRange = VersionRange.createFromVersionSpec(ignoreVersion.getVersion()); + if (versionRange.hasRestrictions()) { + return versionRange.containsVersion(aVersion); + } else { + return versionRange.getRecommendedVersion().equals(aVersion); + } + } catch (InvalidVersionSpecificationException e) { + throw new IgnoreVersionException(e); + } + } +} diff --git a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/DefaultArtifactVersionCache.java b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/DefaultArtifactVersionCache.java index 14d6cdff93..1abfc1bebf 100644 --- a/versions-common/src/main/java/org/codehaus/mojo/versions/utils/DefaultArtifactVersionCache.java +++ b/versions-common/src/main/java/org/codehaus/mojo/versions/utils/DefaultArtifactVersionCache.java @@ -28,7 +28,7 @@ * Simple cache for {@link org.apache.maven.artifact.versioning.ArtifactVersion} */ public class DefaultArtifactVersionCache { - private static final int MAX_CACHE_SIZE = 0x200; + private static final int MAX_CACHE_SIZE = 512; private static final Map CACHE = new LRUMap<>(MAX_CACHE_SIZE); private static final ReentrantReadWriteLock CACHE_LOCK = new ReentrantReadWriteLock(); diff --git a/versions-common/src/test/java/org/codehaus/mojo/versions/api/IgnoreVersionHelperTest.java b/versions-common/src/test/java/org/codehaus/mojo/versions/api/IgnoreVersionHelperTest.java new file mode 100644 index 0000000000..d7f7dc265b --- /dev/null +++ b/versions-common/src/test/java/org/codehaus/mojo/versions/api/IgnoreVersionHelperTest.java @@ -0,0 +1,105 @@ +package org.codehaus.mojo.versions.api; + +/* + * Copyright MojoHaus and Contributors + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.stream.Stream; + +import org.codehaus.mojo.versions.model.IgnoreVersion; +import org.eclipse.aether.util.version.GenericVersionScheme; +import org.eclipse.aether.version.VersionScheme; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.params.provider.Arguments.of; + +class IgnoreVersionHelperTest { + + private static final VersionScheme VERSION_SCHEME = new GenericVersionScheme(); + + static Stream ignoredTypeExact() { + return Stream.of(of("1.0.0", "1.0.0", true), of("2.0.0", "1.0.0", false)); + } + + @ParameterizedTest + @MethodSource + void ignoredTypeExact(String version, String ignore, boolean expected) throws Exception { + + IgnoreVersion ignoreVersion = aIgnoreVersion(ignore, IgnoreVersion.TYPE_EXACT); + + assertEquals( + expected, IgnoreVersionHelper.isVersionIgnored(VERSION_SCHEME.parseVersion(version), ignoreVersion)); + } + + public static Stream ignoredTypeRegex() { + return Stream.of( + of("1.0.0", "1\\.0\\..*", true), + of("1.0.0-SNAPSHOT", ".*-SNAPSHOT", true), + of("1.0.0", "2\\.0\\..*", false)); + } + + @ParameterizedTest + @MethodSource + void ignoredTypeRegex(String version, String ignore, boolean expected) throws Exception { + + IgnoreVersion ignoreVersion = aIgnoreVersion(ignore, IgnoreVersion.TYPE_REGEX); + + assertEquals( + expected, IgnoreVersionHelper.isVersionIgnored(VERSION_SCHEME.parseVersion(version), ignoreVersion)); + } + + public static Stream ignoredTypeRange() { + return Stream.of( + of("1.0.0", "[1.0,)", true), + of("1.0.0", "(,2.0.0]", true), + of("2.2.0", "[1.0,3)", true), + of("2.2.0", "[1.0,2.0)", false), + of("2.2.0", "(,2.0.0]", false), + of("1.0.0", "1.0.0", true), + of("1.0.0", "1.0", true), + of("1.0.1", "1.0", false), + of("1.0.0", "2.0.0", false)); + } + + @ParameterizedTest + @MethodSource + void ignoredTypeRange(String version, String ignore, boolean expected) throws Exception { + + IgnoreVersion ignoreVersion = aIgnoreVersion(ignore, IgnoreVersion.TYPE_RANGE); + + assertEquals( + expected, IgnoreVersionHelper.isVersionIgnored(VERSION_SCHEME.parseVersion(version), ignoreVersion)); + } + + @Test + void invalidRangeShouldThrowException() throws Exception { + IgnoreVersion ignoreVersion = aIgnoreVersion("[1,,", IgnoreVersion.TYPE_RANGE); + + assertThrows( + IgnoreVersionHelper.IgnoreVersionException.class, + () -> IgnoreVersionHelper.isVersionIgnored(VERSION_SCHEME.parseVersion("1.0.0"), ignoreVersion)); + } + + private IgnoreVersion aIgnoreVersion(String version, String type) { + IgnoreVersion ignoreVersion = new IgnoreVersion(); + ignoreVersion.setVersion(version); + ignoreVersion.setType(type); + return ignoreVersion; + } +} diff --git a/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java b/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java index e851c34ddb..4b26b64e72 100644 --- a/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java +++ b/versions-enforcer/src/main/java/org/codehaus/mojo/versions/enforcer/MaxDependencyUpdates.java @@ -240,7 +240,7 @@ public class MaxDependencyUpdates extends AbstractEnforcerRule { *

Allows specifying the {@linkplain RuleSet} object describing rules * on artifact versions to ignore when considering updates.

* - * @see + * @see * Using the ruleSet element in the POM * * @since 2.14.0 diff --git a/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/pom.xml b/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/pom.xml index b3023c5055..658a7f403a 100644 --- a/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/pom.xml +++ b/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/pom.xml @@ -12,7 +12,13 @@ dummy-api 1.1
+ + localhost + dummy-impl + 1.0 + + @@ -27,6 +33,18 @@ 3.0 + + + localhost + dummy-impl + + + range + [2.0,) + + + + diff --git a/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/verify.groovy b/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/verify.groovy index a150dec35d..db39fd6a6c 100644 --- a/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/verify.groovy +++ b/versions-maven-plugin/src/it/it-display-dependency-updates-issue-684-pom-based-rules/verify.groovy @@ -1,7 +1,9 @@ output = new File(basedir, "output1.txt").text assert ! ( output =~ /\Qlocalhost:dummy-api\E\s*\.*\s*1\.1\s+->\s+3\.0\b/ ) assert output =~ /\Qlocalhost:dummy-api\E\s*\.*\s*1\.1\s+->\s+2\.1\b/ +assert output =~ /\Qlocalhost:dummy-impl\E\s*\.*\s*1\.0\s+->\s+1\.4\b/ output = new File(basedir, "output2.txt").text assert ! ( output =~ /\Qlocalhost:dummy-api\E\s*\.*\s*1\.1\s+->\s+2\.1\b/ ) assert output =~ /\Qlocalhost:dummy-api\E\s*\.*\s*1\.1\s+->\s+2\.0\b/ +assert output =~ /\Qlocalhost:dummy-impl\E\s*\.*\s*1\.0\s+->\s+1\.4\b/ diff --git a/versions-maven-plugin/src/it/it-encoding-001/verify.bsh b/versions-maven-plugin/src/it/it-encoding-001/verify.bsh deleted file mode 100644 index 1153e77182..0000000000 --- a/versions-maven-plugin/src/it/it-encoding-001/verify.bsh +++ /dev/null @@ -1,26 +0,0 @@ -import java.io.*; -import org.codehaus.plexus.util.FileUtils; - -try -{ - File file = new File( basedir, "pom.xml" ); - String buf = FileUtils.fileRead( file, "ISO-8859-15" ); - - if ( buf.indexOf( "2.0" ) < 0 ) - { // if pom.xml has not been modified, the test is not useful... - System.err.println( "Version not changed to 2.0" ); - return false; - } - if ( buf.indexOf( "Modify a POM stored with ISO-8859-15 encoding (check euro symbol: \u20AC)" ) < 0 ) - { - System.err.println( "Encoding not preserved while modifying pom.xml" ); - return false; - } -} -catch( Throwable t ) -{ - t.printStackTrace(); - return false; -} - -return true; diff --git a/versions-maven-plugin/src/it/it-encoding-001/verify.groovy b/versions-maven-plugin/src/it/it-encoding-001/verify.groovy new file mode 100644 index 0000000000..780d5d6138 --- /dev/null +++ b/versions-maven-plugin/src/it/it-encoding-001/verify.groovy @@ -0,0 +1,7 @@ +def pom = new File(basedir, "pom.xml").getText("ISO-8859-15") + +// if pom.xml has not been modified, the test is not useful... +assert pom.contains('2.0') + +assert pom.contains('Modify a POM stored with ISO-8859-15 encoding (check euro symbol: \u20AC)') : + 'Encoding not preserved while modifying pom.xml' diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java index 1029da13b8..dc85e3de92 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsReport.java @@ -126,7 +126,7 @@ public abstract class AbstractVersionsReport extends AbstractMavenReport { *

Allows specifying the {@linkplain RuleSet} object describing rules * on artifact versions to ignore when considering updates.

* - * @see + * @see * Using the ruleSet element in the POM * * @since 2.13.0 diff --git a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java index 5be9c69ff1..a3222a4cf3 100644 --- a/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java +++ b/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/AbstractVersionsUpdaterMojo.java @@ -169,7 +169,7 @@ public abstract class AbstractVersionsUpdaterMojo extends AbstractMojo { *

Allows specifying the {@linkplain RuleSet} object describing rules * on artifact versions to ignore when considering updates.

* - * @see + * @see * Using the ruleSet element in the POM * * @since 2.13.0 diff --git a/versions-maven-plugin/src/site/markdown/version-rules.md.vm b/versions-maven-plugin/src/site/markdown/version-rules.md.vm index dcbb066d92..d9007ecab1 100644 --- a/versions-maven-plugin/src/site/markdown/version-rules.md.vm +++ b/versions-maven-plugin/src/site/markdown/version-rules.md.vm @@ -55,14 +55,14 @@ The `versions-maven-plugin` knows three rules for comparing version numbers: The `versions-maven-plugin` will assume that all version numbers follow the `maven` scheme unless you tell it otherwise. -Rules.xml +rules.xml --------- To specify the version schemes to use, you may define a [rule-set xml file](../versions-model/rule.html), use the `ruleSet` element in the `versions-maven-plugin` plugin configuration, or specify ignored versions via the `maven.version.ignore` property. -$h3 Using the `Rules.xml` file +$h3 Using the `rules.xml` file The `rules.xml` file should conform to the xsd specified in the example below. @@ -113,7 +113,7 @@ the `rules.xml` file: 1.0.0 - + regex (.+-SNAPSHOT|.+-M\d) @@ -121,7 +121,11 @@ the `rules.xml` file: regex .+-(alpha|beta) - + + range + [2.0,) + + @@ -164,8 +168,8 @@ explained above. The described ```xml + xmlns="https://www.mojohaus.org/VERSIONS/RULE/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://www.mojohaus.org/VERSIONS/RULE/2.1.0 https://www.mojohaus.org/versions/versions-model/xsd/rule-2.1.0.xsd"> .*-beta @@ -173,6 +177,7 @@ explained above. The described .*-RELEASE + [2.0.0,) 2.1.0 @@ -182,7 +187,7 @@ explained above. The described Note: it is possible to ignore versions using regular expressions. -If you have your ruleset xml file hosted at, for example, http://www.mycompany.com/maven-version-rules.xml +If you have your ruleset xml file hosted at, for example, `http://www.mycompany.com/maven-version-rules.xml` then the following configuration in your corporate pom would ensure that all projects use this rule set. ```xml diff --git a/versions-model/src/main/mdo/rule.mdo b/versions-model/src/main/mdo/rule.mdo index 0134a4b086..eccd9fc518 100644 --- a/versions-model/src/main/mdo/rule.mdo +++ b/versions-model/src/main/mdo/rule.mdo @@ -207,14 +207,21 @@ under the License. type 2.0+ String - The type of ignore mechanism to use. Allowed values are 'exact' and 'regex'. + The type of ignore mechanism to use. Allowed values are 'exact', 'regex' or 'range'. exact 2.0+ - + + } + ]]> +