Skip to content

Commit 09623c8

Browse files
authored
Merge pull request #4937 from objectionary/4936
fixes all warnings in .eo files
2 parents 05cb204 + caefeba commit 09623c8

79 files changed

Lines changed: 1256 additions & 558 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/daily.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
3+
# SPDX-License-Identifier: MIT
4+
5+
set -euo pipefail
6+
7+
workspace=$1
8+
9+
mvn clean install -Pqulice -PskipTests
10+
script=${workspace}/src/test/scripts/test-repetition.sh
11+
if [ ! -f "${script}" ]; then
12+
echo "Script ${script} not found"
13+
exit 1
14+
fi
15+
chmod +x "${script}"
16+
"${script}" --max 10 --folder "${workspace}/eo-parser"
17+
"${script}" --max 10 --folder "${workspace}/eo-maven-plugin"
18+
"${script}" --max 10 --folder "${workspace}/eo-runtime" --compilation true

.github/ebnf.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
3+
# SPDX-License-Identifier: MIT
4+
5+
set -euo pipefail
6+
7+
convert_path=$1
8+
9+
mkdir -p "${convert_path}"
10+
wget --quiet http://public.yegor256.com/convert.zip -O /tmp/convert.zip
11+
unzip -o -d "${convert_path}" /tmp/convert.zip
12+
13+
mvn com.yegor256:antlr2ebnf-maven-plugin:0.0.7:generate \
14+
-pl :eo-parser --errors --batch-mode --quiet \
15+
"-Dantlr2ebnf.convertDir=${convert_path}" \
16+
"-Dantlr2ebnf.specials=eof,eol,eop,tab,untab" \
17+
"-Dantlr2ebnf.margin=40"
18+
19+
git fetch --no-tags origin gh-pages
20+
git checkout gh-pages
21+
mkdir -p ebnf
22+
convert --version
23+
convert --help | grep Delegates
24+
pdfcrop --version
25+
set -x
26+
p="Eo"
27+
cp "eo-parser/target/ebnf/org/eolang/parser/${p}.pdf" .
28+
pdfcrop --margins '10 10 10 10' "${p}.pdf" "${p}-cropped.pdf"
29+
pdf2svg "${p}-cropped.pdf" "${p}.svg"
30+
convert -verbose -density 300 -quality 100 -colorspace RGB "${p}.svg" "${p}.png"
31+
cp "${p}.png" ebnf/
32+
cp "${p}.svg" ebnf/

.github/objectionary.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
3+
# SPDX-License-Identifier: MIT
4+
5+
set -euo pipefail
6+
7+
tag=$1
8+
mkdir -p gh-pages/xsd
9+
mkdir -p gh-pages/objectionary
10+
cp eo-parser/target/classes/XMIR.xsd gh-pages/
11+
cp gh-pages/XMIR.xsd "gh-pages/xsd/XMIR-${tag}.xsd"
12+
cp -R eo-runtime/src/main/eo/* gh-pages/objectionary/
13+
find gh-pages/objectionary -name '*.eo' \
14+
-exec sed -i "s/jvm org.eolang:eo-runtime:0\.0\.0/jvm org.eolang:eo-runtime:${tag}/g" {} +
15+
find gh-pages/objectionary -name '*.eo' \
16+
-exec sed -i "s/version 0\.0\.0/version ${tag}/g" {} +
17+
find gh-pages/objectionary -name '*.eo' -printf 'objectionary/%P\n' > gh-pages/objectionary.lst

.github/telegram.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com
3+
# SPDX-License-Identifier: MIT
4+
5+
set -euo pipefail
6+
7+
ref_name=$1
8+
9+
git fetch --tags --force
10+
(
11+
printf 'Good news, we have just published the %d-th release ' \
12+
"$(git tag | wc -l | xargs)"
13+
printf 'of [EO-to-Java compiler](https://github.com/objectionary/eo): '
14+
printf '[%s](https://github.com/objectionary/eo/releases/tag/%s). ' \
15+
"${ref_name}" "${ref_name}"
16+
printf 'At the moment, there are %dK lines-of code ' \
17+
"$(echo "$(jq '.SUM.code' <cloc.json)" / 1000 | bc)"
18+
printf 'and %dK [hits-of-code](https://www.yegor256.com/2014/11/14/hits-of-code.html) ' \
19+
"$(echo "$(hoc .)" / 1000 | bc)"
20+
printf 'in the [repository](https://github.com/objectionary/eo) on GitHub '
21+
printf '(%d commits total); ' \
22+
"$(git rev-list --count origin/master)"
23+
printf '[%d objects](https://github.com/objectionary/eo/tree/master/eo-runtime/src/main/eo/org/eolang) ' \
24+
"$(find eo-runtime/src/main/eo -name '*.eo' | wc -l)"
25+
printf 'and [%d atoms](https://github.com/objectionary/eo/tree/master/eo-runtime/src/main/java/EOorg/EOeolang) ' \
26+
"$(find eo-runtime/src/main/java/EOorg -name 'EO*.java' | wc -l)"
27+
printf 'in the [eo-runtime](https://github.com/objectionary/eo/tree/master/eo-runtime) module; '
28+
printf '[%d issues](https://github.com/objectionary/eo/issues?q=is%%3Aopen+is%%3Aissue+label%%3A%%22help+wanted%%22) ' \
29+
"$(curl --silent 'https://api.github.com/repos/objectionary/eo/issues?state=open&per_page=100&labels=help%20wanted' | jq length)"
30+
printf 'in the backlog, where your help is needed!\n\n'
31+
printf 'You may also be interested in helping us in these repositories:\n\n'
32+
for r in jeo-maven-plugin phino lints eoc; do
33+
printf ' - [%s](https://github.com/objectionary/%s) ' "${r}" "${r}"
34+
printf '([%d issues]' \
35+
"$(curl --silent "https://api.github.com/repos/objectionary/${r}/issues?state=open&per_page=100&labels=help%20wanted" | jq length)"
36+
printf '(https://github.com/objectionary/%s/issues?q=is%%3Aopen+is%%3Aissue+label%%3A%%22help+wanted%%22))\n' \
37+
"${r}"
38+
done
39+
printf '\nDo not forget to give us your GitHub stars, this is what we work for!'
40+
) > message.md

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/setup-java@v5
2020
with:
2121
distribution: 'temurin'
22-
java-version: 20
22+
java-version: 21
2323
- uses: actions/cache@v5
2424
with:
2525
path: ~/.m2/repository

.github/workflows/daily.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,7 @@ jobs:
2323
key: ${{ runner.os }}-jdk-20-maven-${{ hashFiles('**/pom.xml') }}
2424
restore-keys: |
2525
${{ runner.os }}-jdk-20-maven-
26-
- run: |
27-
# Clean the test classes to avoid caching issues and prepare testing environment
28-
# without running the tests
29-
mvn clean install -Pqulice -PskipTests
30-
# Find script
31-
SCRIPT=${GITHUB_WORKSPACE}/src/test/scripts/test-repetition.sh
32-
# Check that script is exists
33-
if [ ! -f "${SCRIPT}" ]; then
34-
echo "Script ${SCRIPT} not found"
35-
exit 1
36-
fi
37-
# Make script runnable
38-
chmod +x "${SCRIPT}"
39-
# Test eo-parser
40-
"${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-parser"
41-
# Test eo-maven-plugin
42-
"${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-maven-plugin"
43-
# Test eo-runtime
44-
"${SCRIPT}" --max 10 --folder "${GITHUB_WORKSPACE}/eo-runtime" --compilation true
26+
- run: .github/daily.sh ${{ github.workspace }}
4527
report-fail:
4628
name: Create issue on failure
4729
needs: build

.github/workflows/ebnf.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,8 @@ jobs:
3737
path: ~/.m2/repository
3838
key: ${{ runner.os }}-jdk-20-maven-${{ hashFiles('**/pom.xml') }}
3939
restore-keys: ${{ runner.os }}-jdk-20-maven-
40-
- run: |
41-
mkdir -p "$CONVERT_PATH"
42-
wget --quiet http://public.yegor256.com/convert.zip -O /tmp/convert.zip
43-
unzip -o -d "$CONVERT_PATH" /tmp/convert.zip
4440
- run: sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
45-
- run: |
46-
mvn com.yegor256:antlr2ebnf-maven-plugin:0.0.7:generate \
47-
-pl :eo-parser --errors --batch-mode --quiet \
48-
"-Dantlr2ebnf.convertDir=$CONVERT_PATH" \
49-
"-Dantlr2ebnf.specials=eof,eol,eop,tab,untab" \
50-
"-Dantlr2ebnf.margin=40"
51-
- run: |
52-
git fetch --no-tags origin gh-pages
53-
git checkout gh-pages
54-
mkdir -p ebnf
55-
convert --version
56-
convert --help | grep Delegates
57-
pdfcrop --version
58-
set -x
59-
p="Eo"
60-
cp "eo-parser/target/ebnf/org/eolang/parser/${p}.pdf" .
61-
pdfcrop --margins '10 10 10 10' "${p}.pdf" "${p}-cropped.pdf"
62-
pdf2svg "${p}-cropped.pdf" "${p}.svg"
63-
convert -verbose -density 300 -quality 100 -colorspace RGB "${p}.svg" "${p}.png"
64-
cp "${p}.png" ebnf/
65-
cp "${p}.svg" ebnf/
41+
- run: .github/ebnf.sh "$CONVERT_PATH"
6642
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
6743
uses: peter-evans/create-pull-request@v8
6844
with:

.github/workflows/jmh-benchmark-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Run JMH Benchmark Action
1616
uses: volodya-lombrozo/jmh-benchmark-action@v1.0.3
1717
with:
18-
java-version: "11"
18+
java-version: 21
1919
base-ref: "master"
2020
benchmark-command: |
2121
mvn jmh:benchmark -pl eo-parser -Djmh.rf=json -Djmh.rff=benchmark.json

.github/workflows/mvn.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-24.04, windows-2022, macos-15]
18-
java: [17, 23]
19-
exclude:
20-
- os: windows-2022
21-
java: 17
22-
- os: macos-15
23-
java: 17
18+
java: [23]
2419
runs-on: ${{ matrix.os }}
2520
env:
2621
CONVERT_PATH: /tmp/antlr4-to-bnf-converter

.github/workflows/objectionary.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,7 @@ jobs:
2121
distribution: 'temurin'
2222
java-version: 21
2323
- run: mvn install -DskipTests -Dinvoker.skip --errors --batch-mode
24-
- run: |
25-
tag=${{ github.ref_name }}
26-
mkdir -p gh-pages/xsd
27-
mkdir -p gh-pages/objectionary
28-
cp eo-parser/target/classes/XMIR.xsd gh-pages/
29-
cp gh-pages/XMIR.xsd "gh-pages/xsd/XMIR-${tag}.xsd"
30-
cp -R eo-runtime/src/main/eo/* gh-pages/objectionary/
31-
find gh-pages/objectionary -name '*.eo' | \
32-
xargs sed -i "s/jvm org.eolang:eo-runtime:0\.0\.0/jvm org.eolang:eo-runtime:${tag}/g"
33-
find gh-pages/objectionary -name '*.eo' | \
34-
xargs sed -i "s/version 0\.0\.0/version ${tag}/g"
35-
find gh-pages/objectionary -name '*.eo' | sed 's|gh-pages/||' > gh-pages/objectionary.lst
24+
- run: .github/objectionary.sh ${{ github.ref_name }}
3625
- uses: peter-evans/create-pull-request@v8
3726
with:
3827
sign-commits: true

0 commit comments

Comments
 (0)