objectionary / objectionary/lints

prohibited-package false positive when +home URL has a trailing slash

Open Beginner friendly
#1,379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

Problem

A +home URL with a trailing slash (https://github.com/objectionary/eo/) causes false positives in prohibited-package (and breaks mandatory-package), because the home-repo comparison is an exact string match.

Root cause

src/main/resources/org/eolang/funcs/home-object.xsl:27:

<xsl:if test="... and $tail = $eo:home-repo and ...">

eo:home-object returns true only when the +home tail equals $eo:home-repo exactly. $eo:home-repo is built without a trailing slash, so a legitimate +home https://github.com/objectionary/eo/ (with slash) does not match → prohibited-package.xsl:17 treats an ordinary runtime object as prohibited.

Minimal example

+package x
+architect yegor@256.com
+version 0.0.1
+home https://github.com/objectionary/eo/
+spdx SPDX-FileCopyrightText: Copyright (c) 2026 Objectionary.com
+spdx SPDX-License-Identifier: MIT

[] > main

An ordinary object is flagged by prohibited-package because the trailing slash breaks the exact match.

Expected behavior

Normalize the home URL (strip a trailing /) or use starts-with, so that URLs with and without a trailing slash behave identically.

Related

  • metas/prohibited-package.xsl:17
  • metas/mandatory-package.xsl — affected by the same comparison.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/main/resources/org/eolang/funcs/home-object.xsl:27 and compare its home-repository check with metas/prohibited-package.xsl:17 and metas/mandatory-package.xsl. Reproduce the issue with the minimal EO example, then verify that +home URLs with and without a trailing slash produce identical prohibited-package and mandatory-package results.

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
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.