From 00a5231e4c04b03775825bd848f9542e312cf4a6 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 23 Jan 2025 09:03:41 +0300 Subject: [PATCH] simian --- .github/workflows/actionlint.yml | 42 +++++++++++++++++++ .github/workflows/simian.yml | 41 ++++++++++++++++++ .github/workflows/yamllint.yml | 36 ++++++++++++++++ .gitignore | 2 +- .../java/org/cactoos/text/PaddedStart.java | 1 - src/main/java/org/cactoos/time/Iso.java | 1 - .../java/org/cactoos/io/SlowInputTest.java | 1 - .../java/org/cactoos/iterable/PagedTest.java | 1 - .../java/org/cactoos/iterator/PagedTest.java | 1 - .../org/cactoos/text/PaddedStartTest.java | 1 - .../org/cactoos/digest-calculation.txt | 2 +- src/test/resources/org/cactoos/small-text.txt | 2 +- 12 files changed, 122 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/actionlint.yml create mode 100644 .github/workflows/simian.yml create mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000000..c57911343d --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,42 @@ +# The MIT License (MIT) +# +# Copyright (c) 2017-2025 Yegor Bugayenko +# +# 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. +--- +name: actionlint +'on': + push: + branches: + - master + pull_request: + branches: + - master +jobs: + actionlint: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Download actionlint + id: get_actionlint + run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + shell: bash + - name: Check workflow files + run: ${{ steps.get_actionlint.outputs.executable }} -color + shell: bash diff --git a/.github/workflows/simian.yml b/.github/workflows/simian.yml new file mode 100644 index 0000000000..6ca064c9db --- /dev/null +++ b/.github/workflows/simian.yml @@ -0,0 +1,41 @@ +# The MIT License (MIT) +# +# Copyright (c) 2017-2025 Yegor Bugayenko +# +# 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. +--- +name: simian +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + simian: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + - run: wget --quiet http://public.yegor256.com/simian.jar -O /tmp/simian.jar + - run: java -jar /tmp/simian.jar -threshold=15 "-excludes=**/EOsocketTest.java" "-excludes=**/gen" "-excludes=**/it" "**/*.java" diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000000..45692f4bc9 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,36 @@ +# The MIT License (MIT) +# +# Copyright (c) 2017-2025 Yegor Bugayenko +# +# 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. +--- +name: yamllint +'on': + push: + branches: + - master + pull_request: + branches: + - master +jobs: + yamllint: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: ibiqlik/action-yamllint@v3 diff --git a/.gitignore b/.gitignore index d55832d219..7215097f8a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ target/ .settings .classpath .recommenders -/nbproject/ \ No newline at end of file +/nbproject/ diff --git a/src/main/java/org/cactoos/text/PaddedStart.java b/src/main/java/org/cactoos/text/PaddedStart.java index 6c936854d6..a0f17ba493 100644 --- a/src/main/java/org/cactoos/text/PaddedStart.java +++ b/src/main/java/org/cactoos/text/PaddedStart.java @@ -57,4 +57,3 @@ public PaddedStart( ); } } - diff --git a/src/main/java/org/cactoos/time/Iso.java b/src/main/java/org/cactoos/time/Iso.java index 2f1c352249..59f42d82d6 100644 --- a/src/main/java/org/cactoos/time/Iso.java +++ b/src/main/java/org/cactoos/time/Iso.java @@ -38,4 +38,3 @@ public DateTimeFormatter value() { } } - diff --git a/src/test/java/org/cactoos/io/SlowInputTest.java b/src/test/java/org/cactoos/io/SlowInputTest.java index dfd8065318..f2cc44f7ee 100644 --- a/src/test/java/org/cactoos/io/SlowInputTest.java +++ b/src/test/java/org/cactoos/io/SlowInputTest.java @@ -68,4 +68,3 @@ void readsFileContentSlowly() { } } - diff --git a/src/test/java/org/cactoos/iterable/PagedTest.java b/src/test/java/org/cactoos/iterable/PagedTest.java index 6ff7baeffa..d6188dd53c 100644 --- a/src/test/java/org/cactoos/iterable/PagedTest.java +++ b/src/test/java/org/cactoos/iterable/PagedTest.java @@ -118,4 +118,3 @@ void throwsNoSuchElement() { } } - diff --git a/src/test/java/org/cactoos/iterator/PagedTest.java b/src/test/java/org/cactoos/iterator/PagedTest.java index 5b6a2a3d11..4be9f126ed 100644 --- a/src/test/java/org/cactoos/iterator/PagedTest.java +++ b/src/test/java/org/cactoos/iterator/PagedTest.java @@ -136,4 +136,3 @@ void throwsNoSuchElement() { ).affirm(); } } - diff --git a/src/test/java/org/cactoos/text/PaddedStartTest.java b/src/test/java/org/cactoos/text/PaddedStartTest.java index 5350ede3fa..1d4cd7997b 100644 --- a/src/test/java/org/cactoos/text/PaddedStartTest.java +++ b/src/test/java/org/cactoos/text/PaddedStartTest.java @@ -74,4 +74,3 @@ void noPaddingIfRequestedLengthIsNegative() { ).affirm(); } } - diff --git a/src/test/resources/org/cactoos/digest-calculation.txt b/src/test/resources/org/cactoos/digest-calculation.txt index 0ca5976c1c..842511d4cf 100644 --- a/src/test/resources/org/cactoos/digest-calculation.txt +++ b/src/test/resources/org/cactoos/digest-calculation.txt @@ -1 +1 @@ -That file is used for digest calculation with different algorithms, so please DO NOT CHANGE IT. If you DO, then make sure all tests of DigestInvelope are passed. \ No newline at end of file +That file is used for digest calculation with different algorithms, so please DO NOT CHANGE IT. If you DO, then make sure all tests of DigestInvelope are passed. diff --git a/src/test/resources/org/cactoos/small-text.txt b/src/test/resources/org/cactoos/small-text.txt index 45ff25a3ea..1f4081eb1f 100644 --- a/src/test/resources/org/cactoos/small-text.txt +++ b/src/test/resources/org/cactoos/small-text.txt @@ -4,4 +4,4 @@ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo \ No newline at end of file +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo