Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/copyrights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ jobs:
**/*.properties
**/*.toml
**/*.groovy
ignore: >-
eo-parser/src/test/resources/org/eolang/parser/fibonacci.eo
Comment thread
h1alexbel marked this conversation as resolved.
Outdated
eo-parser/src/test/resources/org/eolang/parser/factorial.eo
eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo
4 changes: 3 additions & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ path = [
"**/README.md",
"**/javax.xml.transform.TransformerFactory",
"**/javax.xml.xpath.XPathFactory",
# License located inside +spdx meta, to be checked by "lints"
"**/*.eo",
Comment thread
h1alexbel marked this conversation as resolved.
Outdated
".codenarc",
".gitattributes",
".gitleaksignore",
Expand All @@ -32,7 +34,7 @@ path = [
"Gemfile.lock",
"eo-maven-plugin/src/main/resources/org/eolang/maven/latex/latex-template.txt",
"eo-maven-plugin/src/test/resources/org/eolang/maven/commits/tags.txt",
"eo-runtime/src/main/resources/org/eolang/version.txt",
"eo-runtime/src/main/resources/org/eolang/version.txt"
]
precedence = "override"
SPDX-FileCopyrightText = "Copyright (c) 2016-2025 Objectionary.com"
Expand Down
2 changes: 1 addition & 1 deletion eo-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.eolang</groupId>
<artifactId>lints</artifactId>
<version>0.0.38</version>
<version>0.0.39</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
Expand Down
8 changes: 7 additions & 1 deletion eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,16 @@ private static String summary(final ConcurrentHashMap<Severity, Integer> counts)
* @param xmir The XML before linting
* @param counts Counts of errors, warnings, and critical
* @return XML after linting
* @todo #3934:35min Remove .without() from Program to enable `unknown-metas`
* and `unsorted-metas` lints. Currently we disabled them since lints does not
* support `+spdx` meta yet. Once <a href="https://github.com/objectionary/lints/issues/354">this</a>
* issue will be resolved, we should enable all lints.
*/
private static XML linted(final XML xmir, final ConcurrentHashMap<Severity, Integer> counts) {
final Directives dirs = new Directives();
final Collection<Defect> defects = new Program(xmir).defects();
final Collection<Defect> defects = new Program(xmir).without(
"unknown-metas", "unsorted-metas"
).defects();
if (!defects.isEmpty()) {
dirs.xpath("/program").addIf("errors").strict(1);
LintMojo.embed(xmir, defects);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
* SPDX-License-Identifier: MIT
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eo="https://www.eolang.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="set-original-names" version="2.0">
<!--
Expand Down
3 changes: 0 additions & 3 deletions eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+alias org.eolang.io.stdout
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# 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.
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
sheets:
- /org/eolang/maven/shake/set-original-names.xsl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# 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.
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
sheets:
- /org/eolang/maven/shake/set-original-names.xsl
Expand Down
7 changes: 1 addition & 6 deletions eo-parser/src/main/antlr4/org/eolang/parser/Eo.g4
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@ tokens { TAB, UNTAB }

// Entry point
program
: license? metas? objects EOF
: metas? objects EOF
;

// Double EOL
eop : EOL EOL
;

// Licence
license
: (COMMENTARY EOL)* COMMENTARY eop
;

// Metas
metas
: (META EOL)* META eop
Expand Down
20 changes: 0 additions & 20 deletions eo-parser/src/main/java/org/eolang/parser/XeEoListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
import org.apache.commons.text.StringEscapeUtils;
import org.cactoos.iterable.Mapped;
import org.cactoos.text.Joined;
import org.xembly.Directive;
import org.xembly.Directives;

Expand Down Expand Up @@ -104,24 +102,6 @@ public void exitEop(final EoParser.EopContext ctx) {
// Nothing here
}

@Override
public void enterLicense(final EoParser.LicenseContext ctx) {
this.dirs.addIf("license").set(
new Joined(
"\n",
new Mapped<>(
cmt -> cmt.getText().substring(1).trim(),
ctx.COMMENTARY()
)
)
).up();
}

@Override
public void exitLicense(final EoParser.LicenseContext ctx) {
// Nothing here
}

@Override
public void enterMetas(final EoParser.MetasContext ctx) {
this.dirs.addIf("metas");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
sheets: [ ]
asserts:
- /program[not(errors)]
- /program/license[text()!='']
- /program/metas[count(meta)=4]
- /program/metas/meta[head='foo' and tail='']
- //o[@base='Q.org.eolang.true']
Expand All @@ -18,10 +17,6 @@ asserts:
- //o[@atom and @name='atom' and count(o)=2 and o[@name='a']]
- //o[@atom='org.eolang.number']
input: |
# The purpose of this test case is to make
# sure all possible syntax scenarios can
# be parsed by the ANTLR

+alias org.example.foo
+alias Test Test
+bar Some text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ asserts:
- /program/objects[count(o)=1]
- //o[@base='.and']
input: |
# This program is from the EOLANG original paper
# and must produce a working command line tool
#
# License is MIT

+alias org.eolang.io.stdin
+alias org.eolang.io.stdout
+alias org.eolang.txt.scanner
Expand Down
3 changes: 0 additions & 3 deletions eo-parser/src/test/resources/org/eolang/parser/factorial.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

[n] > f
if. > @
n.lt 1
Expand Down
3 changes: 0 additions & 3 deletions eo-parser/src/test/resources/org/eolang/parser/fibonacci.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+meta This is just a test META
+meta2 And yet another one

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,6 @@
# SPDX-License-Identifier: MIT
---
input: |
# 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.

+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# SPDX-License-Identifier: MIT
---
origin: |
# This is the license part
# of the program

+meta1
+meta2 short
+meta2 long tail
Expand Down Expand Up @@ -33,9 +30,6 @@ origin: |
"hello, 大家!"

printed: |
# This is the license part
# of the program

+meta1
+meta2 short
+meta2 long tail
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/bytes.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.txt.sprintf
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/cti.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/dataized.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/error.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/false.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/fs/dir.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.txt.sprintf
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/fs/file.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.txt.sprintf
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/fs/path.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.fs.dir
+alias org.eolang.fs.file
+alias org.eolang.sys.os
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/fs/tmpdir.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.fs.dir
+alias org.eolang.fs.file
+alias org.eolang.sys.getenv
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/go.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
+package org.eolang
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/i16.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.txt.sprintf
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
5 changes: 2 additions & 3 deletions eo-runtime/src/main/eo/org/eolang/i32.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
# SPDX-License-Identifier: MIT

+spdx SPDX-FileCopyrightText Copyright (c) 2016-2025 Objectionary.com
+spdx SPDX-License-Identifier MIT
+alias org.eolang.txt.sprintf
+architect yegor256@gmail.com
+home https://github.com/objectionary/eo
Expand Down
Loading