From dcacbc016b0809b356fe4ae4732be23ea65f4c0e Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sat, 11 May 2024 03:44:07 -0400 Subject: [PATCH] #280 yaml checks --- .0pdd.yml | 26 ++++++++++++++++--- .github/workflows/actionlint.yml | 43 ++++++++++++++++++++++++++++++++ .github/workflows/grunt.yml | 24 +++++++++++++++++- .github/workflows/itest.yml | 39 +++++++++++++++++++++++++---- .github/workflows/pdd.yml | 23 ++++++++++++++++- .github/workflows/up.yml | 27 ++++++++++++++++++-- .github/workflows/xcop.yml | 23 ++++++++++++++++- .github/workflows/yamllint.yml | 36 ++++++++++++++++++++++++++ .rultor.yml | 24 +++++++++++++++++- Gruntfile.js | 2 +- LICENSE.txt | 2 +- itest/program.eo | 2 +- itest/story-test.eo | 2 +- itest/story.eo | 2 +- mvnw/pom.xml | 2 +- src/commands/assemble.js | 2 +- src/commands/audit.js | 2 +- src/commands/clean.js | 2 +- src/commands/compile.js | 2 +- src/commands/dataize.js | 2 +- src/commands/foreign.js | 2 +- src/commands/link.js | 2 +- src/commands/parse.js | 2 +- src/commands/phi.js | 2 +- src/commands/print.js | 2 +- src/commands/register.js | 2 +- src/commands/sodg.js | 2 +- src/commands/test.js | 2 +- src/commands/transpile.js | 2 +- src/commands/unphi.js | 2 +- src/commands/verify.js | 2 +- src/demand.js | 2 +- src/eoc.js | 2 +- src/mvnw.js | 2 +- src/parser-version.js | 2 +- src/tinted-console.js | 2 +- src/version.js | 2 +- test/commands/test_assemble.js | 2 +- test/commands/test_audit.js | 2 +- test/commands/test_clean.js | 2 +- test/commands/test_compile.js | 2 +- test/commands/test_dataize.js | 2 +- test/commands/test_foreign.js | 2 +- test/commands/test_link.js | 2 +- test/commands/test_parse.js | 2 +- test/commands/test_phi.js | 2 +- test/commands/test_print.js | 2 +- test/commands/test_register.js | 2 +- test/commands/test_sodg.js | 2 +- test/commands/test_test.js | 2 +- test/commands/test_transpile.js | 2 +- test/commands/test_unphi.js | 2 +- test/commands/test_verify.js | 2 +- test/helpers.js | 2 +- test/test_eoc.js | 2 +- test/test_mvnw.js | 2 +- 56 files changed, 297 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/actionlint.yml create mode 100644 .github/workflows/yamllint.yml diff --git a/.0pdd.yml b/.0pdd.yml index 36d0a7f..a68b1b8 100644 --- a/.0pdd.yml +++ b/.0pdd.yml @@ -1,9 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- errors: - yegor256@gmail.com -# alerts: -# github: -# - yegor256 - tags: - pdd - bug diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..ea78987 --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,43 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- +name: actionlint +'on': + push: + branches: + - master + pull_request: + branches: + - master +jobs: + actionlint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Download actionlint + id: get_actionlint + # yamllint disable-line rule:line-length + 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/grunt.yml b/.github/workflows/grunt.yml index a1a7513..a5f92d1 100644 --- a/.github/workflows/grunt.yml +++ b/.github/workflows/grunt.yml @@ -1,5 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- name: grunt -on: +'on': push: pull_request: concurrency: diff --git a/.github/workflows/itest.yml b/.github/workflows/itest.yml index 4b0b9a9..b4b79ba 100644 --- a/.github/workflows/itest.yml +++ b/.github/workflows/itest.yml @@ -1,5 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- name: itest -on: +'on': push: pull_request: concurrency: @@ -23,7 +45,14 @@ jobs: distribution: 'zulu' java-version: ${{ matrix.java }} - run: npm install - - run: cd itest && node ../src/eoc.js --parser=0.36.0 --home-tag=0.36.0 --batch dataize program - - run: cd itest && node ../src/eoc.js --parser=0.36.0 --home-tag=0.36.0 --alone --batch dataize program - - run: cd itest && node ../src/eoc.js clean - - run: cd itest && node ../src/eoc.js --parser=0.36.0 --home-tag=0.36.0 --batch test + - run: | + cd itest + p=0.36.0 + t=0.36.0 + node ../src/eoc.js "--parser=$p" "--home-tag=$t" --batch \ + dataize program + node ../src/eoc.js "--parser=$p" "--home-tag=$t" --alone \ + --batch dataize program + node ../src/eoc.js clean + node ../src/eoc.js "--parser=$p" "--home-tag=$t" --batch \ + test diff --git a/.github/workflows/pdd.yml b/.github/workflows/pdd.yml index 78277a2..2ad775e 100644 --- a/.github/workflows/pdd.yml +++ b/.github/workflows/pdd.yml @@ -1,6 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. --- name: pdd -on: +'on': push: branches: - master diff --git a/.github/workflows/up.yml b/.github/workflows/up.yml index 1286d92..47e46d8 100644 --- a/.github/workflows/up.yml +++ b/.github/workflows/up.yml @@ -1,6 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. --- name: up -on: +'on': push: branches: - master @@ -15,7 +36,9 @@ jobs: steps: - uses: actions/checkout@v4 - run: sudo apt-get -y install jq - - run: curl https://api.github.com/repos/objectionary/eo/releases/latest --silent | jq -r .tag_name > eo-version.txt + - run: | + curl https://api.github.com/repos/objectionary/eo/releases/latest \ + --silent | jq -r .tag_name > eo-version.txt - uses: peter-evans/create-pull-request@v6 with: branch: version-up diff --git a/.github/workflows/xcop.yml b/.github/workflows/xcop.yml index da187fe..43b8c5c 100644 --- a/.github/workflows/xcop.yml +++ b/.github/workflows/xcop.yml @@ -1,6 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. --- name: xcop -"on": +'on': push: branches: - master diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..20c850c --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,36 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- +name: yamllint +'on': + push: + branches: + - master + pull_request: + branches: + - master +jobs: + yamllint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: ibiqlik/action-yamllint@v3 diff --git a/.rultor.yml b/.rultor.yml index b56af20..bc05d4e 100644 --- a/.rultor.yml +++ b/.rultor.yml @@ -1,5 +1,27 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-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. +--- docker: - image: yegor256/rultor-image:1.20.0 + image: yegor256/rultor-image:1.23.1 assets: npmrc: yegor256/objectionary-secrets#npmrc install: | diff --git a/Gruntfile.js b/Gruntfile.js index 45fb910..629d878 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2022-2023 Objectionary.com + * Copyright (c) 2022-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 diff --git a/LICENSE.txt b/LICENSE.txt index d8b1123..f440d51 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2022-2023 Objectionary.com +Copyright (c) 2022-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 diff --git a/itest/program.eo b/itest/program.eo index c9abab8..04c62ac 100644 --- a/itest/program.eo +++ b/itest/program.eo @@ -1,6 +1,6 @@ # The MIT License (MIT) # -# Copyright (c) 2022-2023 Objectionary.com +# Copyright (c) 2022-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 diff --git a/itest/story-test.eo b/itest/story-test.eo index c4a13ef..5dab1ab 100644 --- a/itest/story-test.eo +++ b/itest/story-test.eo @@ -1,6 +1,6 @@ # The MIT License (MIT) # -# Copyright (c) 2022-2023 Objectionary.com +# Copyright (c) 2022-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 diff --git a/itest/story.eo b/itest/story.eo index b69784d..3303cd8 100644 --- a/itest/story.eo +++ b/itest/story.eo @@ -1,6 +1,6 @@ # The MIT License (MIT) # -# Copyright (c) 2022-2023 Objectionary.com +# Copyright (c) 2022-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 diff --git a/mvnw/pom.xml b/mvnw/pom.xml index a5f3a4d..284c8c4 100644 --- a/mvnw/pom.xml +++ b/mvnw/pom.xml @@ -1,6 +1,6 @@