Skip to content

Commit 307975e

Browse files
committed
bug(#237): allows SNAPSHOT only
1 parent bf500c9 commit 307975e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/resources/org/eolang/lints/metas/incorrect-version.xsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SOFTWARE.
3030
<xsl:for-each select="/program/metas/meta">
3131
<xsl:variable name="meta-head" select="head"/>
3232
<xsl:variable name="meta-tail" select="tail"/>
33-
<xsl:if test="$meta-head='version' and not(matches($meta-tail, '^\d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?$|^\d+\.\d+(-[a-zA-Z0-9-]+)$'))">
33+
<xsl:if test="$meta-head='version' and not(matches($meta-tail, '^\d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?$|^\d+\.\d+-SNAPSHOT$'))">
3434
<xsl:element name="defect">
3535
<xsl:attribute name="line">
3636
<xsl:value-of select="eo:lineno(@line)"/>

src/test/resources/org/eolang/lints/packs/incorrect-version/catches-bad-maven-convention.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
sheets:
2424
- /org/eolang/lints/metas/incorrect-version.xsl
2525
asserts:
26-
- /defects[count(defect[@severity='warning'])=1]
26+
- /defects[count(defect[@severity='warning'])=2]
2727
- /defects/defect[@line='1']
28+
- /defects/defect[@line='2']
2829
input: |
2930
+version x.z-SNAPSHOT
31+
+version 1.1-hello
3032
3133
# No comments.
3234
[x] > foo

0 commit comments

Comments
 (0)