From f6b423b2b38a30d38ee8b45b66f3a8aef94ae830 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Fri, 6 Dec 2024 17:52:32 +0300 Subject: [PATCH 1/2] fix(#3617): try with 0.19 --- eo-maven-plugin/pom.xml | 2 +- .../java/org/eolang/maven/LintMojoTest.java | 2 +- .../org/eolang/parser/packs/float-up-phi.yaml | 56 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml diff --git a/eo-maven-plugin/pom.xml b/eo-maven-plugin/pom.xml index 65bb0768b3..0f18393d0c 100644 --- a/eo-maven-plugin/pom.xml +++ b/eo-maven-plugin/pom.xml @@ -42,7 +42,7 @@ SOFTWARE. org.eolang lints - 0.0.18 + 0.0.19 com.yegor256 diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java index 262743cceb..dec3324e48 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java @@ -139,7 +139,7 @@ void detectsWarningWithCorrespondingFlag(@Mktmp final Path temp) throws IOExcept new XMLDocument( maven.result().get("target/6-lint/foo/x/main.xmir") ).nodes("//errors/error[@severity='warning']"), - Matchers.hasSize(Matchers.equalTo(4)) + Matchers.hasSize(Matchers.equalTo(6)) ); } diff --git a/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml b/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml new file mode 100644 index 0000000000..ef9f11f099 --- /dev/null +++ b/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml @@ -0,0 +1,56 @@ +# The MIT License (MIT) +# +# Copyright (c) 2016-2024 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/parser/optimize/remove-refs.xsl + - /org/eolang/parser/optimize/abstracts-float-up.xsl + - /org/eolang/parser/optimize/remove-levels.xsl + - /org/eolang/parser/add-refs.xsl + - /org/eolang/parser/clean-up.xsl +asserts: + - /program[count(.//o[@base='build' and not(@ref)])=2] +input: | + # No comments. + [] > hello + # No comments. + [f s] > calc + plus. > @ + f.next + s.next + seq > @ + QQ.io.stdout + QQ.txt.sprintf + "Result is %d\n" + calc + [] + # No comments. + [x] > build + x.plus 1 > @ + build (@.plus 1) > next + build 1 > @ + [] + # No comments. + [y] > build + y.plus 2 > @ + build (@.plus 2) > next + build 2 > @ + true From 66e8da1b511f524e3f547fd0c5f801af3b39a345 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Fri, 6 Dec 2024 21:51:15 +0300 Subject: [PATCH 2/2] fix(#3617): 20 --- eo-maven-plugin/pom.xml | 2 +- .../org/eolang/parser/packs/float-up-phi.yaml | 56 ------------------- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml diff --git a/eo-maven-plugin/pom.xml b/eo-maven-plugin/pom.xml index 0f18393d0c..f03c30968b 100644 --- a/eo-maven-plugin/pom.xml +++ b/eo-maven-plugin/pom.xml @@ -42,7 +42,7 @@ SOFTWARE. org.eolang lints - 0.0.19 + 0.0.20 com.yegor256 diff --git a/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml b/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml deleted file mode 100644 index ef9f11f099..0000000000 --- a/eo-parser/src/test/resources/org/eolang/parser/packs/float-up-phi.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016-2024 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/parser/optimize/remove-refs.xsl - - /org/eolang/parser/optimize/abstracts-float-up.xsl - - /org/eolang/parser/optimize/remove-levels.xsl - - /org/eolang/parser/add-refs.xsl - - /org/eolang/parser/clean-up.xsl -asserts: - - /program[count(.//o[@base='build' and not(@ref)])=2] -input: | - # No comments. - [] > hello - # No comments. - [f s] > calc - plus. > @ - f.next - s.next - seq > @ - QQ.io.stdout - QQ.txt.sprintf - "Result is %d\n" - calc - [] - # No comments. - [x] > build - x.plus 1 > @ - build (@.plus 1) > next - build 1 > @ - [] - # No comments. - [y] > build - y.plus 2 > @ - build (@.plus 2) > next - build 2 > @ - true