objectionary / objectionary/lints
incorrect-spdx skips single-segment +spdx values like 'MIT'
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
Problem
incorrect-spdx does not check single-segment +spdx values at all — e.g. +spdx MIT (with no space-separated SPDX-...: header) is silently accepted.
Root cause
src/main/resources/org/eolang/lints/metas/incorrect-spdx.xsl:13:
<xsl:for-each select="/object/metas/meta[head='spdx' and count(part) > 1]">
The count(part) > 1 guard skips metas whose tail has a single whitespace-separated part, so +spdx MIT never reaches the validation logic.
Minimal example
+package x
+architect yegor@256.com
+version 0.0.1
+home https://github.com/objectionary
+spdx MIT
+spdx SPDX-FileCopyrightText: Copyright (c) 2026 Objectionary.com
+spdx SPDX-License-Identifier: MIT
[] > main
+spdx MIT is not flagged, even though a valid SPDX meta must start with SPDX-...:.
Expected behavior
Single-part +spdx values (e.g. MIT, Apache-2.0) should be flagged as incorrect, or the guard should be reworked so the validation covers them.
Related
metas/mandatory-spdx.xsl— sibling rule.- Existing packs under
packs/single/incorrect-spdx/.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/resources/org/eolang/lints/metas/incorrect-spdx.xsl, especially the selection at line 13, and compare it with the sibling metas/mandatory-spdx.xsl rule. Inspect the existing packs under packs/single/incorrect-spdx/ and verify that single-part values such as MIT and Apache-2.0 are flagged while valid SPDX-prefixed values remain accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- xml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100