From 894614e99a945904ec325b8c7ce4def555eef16c Mon Sep 17 00:00:00 2001 From: h1alexbel Date: Tue, 4 Feb 2025 14:37:10 +0300 Subject: [PATCH 1/4] feat(#304): duplicate unlint tests --- .../catches-duplicate-unlint.yaml | 33 +++++++++++++++++++ .../passes-on-all-unique-unlint.yaml | 32 ++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 src/test/resources/org/eolang/lints/packs/duplicate-metas/catches-duplicate-unlint.yaml create mode 100644 src/test/resources/org/eolang/lints/packs/duplicate-metas/passes-on-all-unique-unlint.yaml diff --git a/src/test/resources/org/eolang/lints/packs/duplicate-metas/catches-duplicate-unlint.yaml b/src/test/resources/org/eolang/lints/packs/duplicate-metas/catches-duplicate-unlint.yaml new file mode 100644 index 00000000..1bfc043a --- /dev/null +++ b/src/test/resources/org/eolang/lints/packs/duplicate-metas/catches-duplicate-unlint.yaml @@ -0,0 +1,33 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2025 Objectionary.com +# +# 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 NON-INFRINGEMENT. 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. +--- +sheets: + - /org/eolang/lints/metas/duplicate-metas.xsl +asserts: + - /defects[count(defect[@severity='warning'])=1] + - /defects/defect[@line='2'] +input: | + +unlint foo + +unlint foo + + # No comments. + [] > main diff --git a/src/test/resources/org/eolang/lints/packs/duplicate-metas/passes-on-all-unique-unlint.yaml b/src/test/resources/org/eolang/lints/packs/duplicate-metas/passes-on-all-unique-unlint.yaml new file mode 100644 index 00000000..ebba0205 --- /dev/null +++ b/src/test/resources/org/eolang/lints/packs/duplicate-metas/passes-on-all-unique-unlint.yaml @@ -0,0 +1,32 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2025 Objectionary.com +# +# 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 NON-INFRINGEMENT. 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. +--- +sheets: + - /org/eolang/lints/metas/duplicate-metas.xsl +asserts: + - /defects[count(defect[@severity='warning'])=0] +input: | + +unlint foo + +unlint bar + + # No comments. + [] > main From 3a91fceefec10292af3f087786d6700ae558e2ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:31:03 +0000 Subject: [PATCH 2/4] fix(deps): update dependency com.github.volodya-lombrozo:xnav to v0.1.9 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf0ff35c..06b8ddf0 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,7 @@ SOFTWARE. com.github.volodya-lombrozo xnav - 0.1.8 + 0.1.9 org.apache.opennlp From b4a8a918668aeeb3eccb5b1ea71ac9ae98172bba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:31:06 +0000 Subject: [PATCH 3/4] chore(deps): update dependency org.pitest:pitest-maven to v1.18.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf0ff35c..f1363e3c 100644 --- a/pom.xml +++ b/pom.xml @@ -299,7 +299,7 @@ SOFTWARE. org.pitest pitest-maven - 1.17.4 + 1.18.0 From 332aff92b7eacdffe96aec564325018002183c8d Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 6 Feb 2025 15:54:29 +0300 Subject: [PATCH 4/4] print index per version --- .github/motives.sh | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/motives.sh b/.github/motives.sh index d667934c..69b5839e 100755 --- a/.github/motives.sh +++ b/.github/motives.sh @@ -40,10 +40,7 @@ while IFS= read -r f; do echo "${n} -> $(du -b "${html}" | cut -f1) bytes" done < <(find src/main/resources/org/eolang/motives -name '*.md') -( - printf '\n' - printf '

Latest version: %s

\n' "${tag}" - printf '

List of lints in this version

' +function list_them() { printf "

    \n" while IFS= read -r f; do n=$(basename "${f}" ".html") @@ -51,6 +48,28 @@ done < <(find src/main/resources/org/eolang/motives -name '*.md') "/lints/${tag}/${n}.html" "${n}" done < <(find "gh-pages/${tag}" -name '*.html' | sort) printf '
\n' +} + +function head() { + printf '\n' +} + +function tail() { printf '

Published on %s.

\n' "$(date)" printf '' +} + +( + head + printf '

Latest version: %s

\n' "${tag}" "${tag}" + printf '

List of lints in this version:

' + list_them + tail ) > "gh-pages/index.html" + +( + head + printf "

List of lints in %s:

" "${tag}" + list_them + tail +) > "gh-pages/${tag}/index.html"