6
61
Fork
You've already forked reuse-tool
23

Breaks on non-file entities in project #1344

Open
opened 2026年03月19日 09:56:46 +01:00 by alerque · 0 comments

I've run into a consistent and annoying problem where many of why projects will not successfully lint while I'm working on them. The root cause is my use of bacon for testing, and having it configured with a bridge to my editor that uses a local socket node. While running it creates a node in the file system .bacon.socket that is not a file but a Unix socket.

I have this name listed in .gitignore and it doesn't bother anything else, but reuse lint trips up on it.

$ reuse lint
reuse.report - ERROR - Could not read '.bacon.socket'
OSError: .bacon.socket is not a file
# READ ERRORS
Could not read:
* .bacon.socket
# SUMMARY
* Bad licenses: 0
* Deprecated licenses: 0
* Licenses without file extension: 0
* Missing licenses: 0
* Unused licenses: 0
* Used licenses: 0BSD, AGPL-3.0-only, CC0-1.0, GPL-3.0-or-later
* Read errors: 1
* Invalid SPDX License Expressions: 0
* Files with copyright information: 55 / 55
* Files with license information: 55 / 55
Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-(
# RECOMMENDATIONS
* Fix read errors: At least one of the files in your directory cannot be read by
 the tool. Please check the file permissions. You will find the affected files
 at the top of the output as part of the logged error messages.

If I close down bacon so it removes it's socket, the linting works fine.

I think reuse needs to completely ignore non-file nodes even if they are not listed in .gitignore.

Also note it doesn't matter if I list it in the REUSE.toml file with some bogus license data, it still errors on trying to read the "file" that isn't a file.

While fixing this, its probably worth making sure named pipes and other non-file nodes don't trip this up too.

I've run into a consistent and annoying problem where many of why projects will not successfully lint while I'm working on them. The root cause is my use of [`bacon`](https://github.com/Canop/bacon) for testing, and having it configured with a bridge to my editor that uses a local socket node. While running it creates a node in the file system `.bacon.socket` that is not a file but a Unix socket. I have this name listed in `.gitignore` and it doesn't bother anything else, but `reuse lint` trips up on it. ```cosole $ reuse lint reuse.report - ERROR - Could not read '.bacon.socket' OSError: .bacon.socket is not a file # READ ERRORS Could not read: * .bacon.socket # SUMMARY * Bad licenses: 0 * Deprecated licenses: 0 * Licenses without file extension: 0 * Missing licenses: 0 * Unused licenses: 0 * Used licenses: 0BSD, AGPL-3.0-only, CC0-1.0, GPL-3.0-or-later * Read errors: 1 * Invalid SPDX License Expressions: 0 * Files with copyright information: 55 / 55 * Files with license information: 55 / 55 Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-( # RECOMMENDATIONS * Fix read errors: At least one of the files in your directory cannot be read by the tool. Please check the file permissions. You will find the affected files at the top of the output as part of the logged error messages. ``` If I close down `bacon` so it removes it's socket, the linting works fine. I think `reuse` needs to completely ignore non-file nodes even if they are not listed in .gitignore. Also note it doesn't matter if I list it in the `REUSE.toml` file with some bogus license data, it still errors on trying to read the "file" that isn't a file. While fixing this, its probably worth making sure named pipes and other non-file nodes don't trip this up too.
Sign in to join this conversation.
No Branch/Tag specified
main
janderssonse/fix/add-security-policy
mirror-codeberg
changelog-2.0.0-extend
readme-reuse-3.1
feature/debian-inspector
feature/dep5-error-handling
v6.2.0
v6.1.2
v6.1.1
v6.1.0
v6.0.0
v5.1.1
v5.1.0
v5.0.2
v5.0.1
v5.0.0
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.1.0a1
v3.0.2
v3.0.1
v3.0.0
v2.1.0
v2.0.0
v1.1.2
v1.1.1
v1.1.0
v1.0.0
v0.14.0
v0.13.0
v0.12.1
v0.12.0
v0.11.1
v0.11.0
v0.10.1
v0.10.0
v0.9.0
v0.8.1
v0.8.0
v0.7.0
v0.6.0
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.4.0a1
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.0
v0.1.1
v0.1.0
v0.0.4
v0.0.3
v0.0.2
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fsfe/reuse-tool#1344
Reference in a new issue
fsfe/reuse-tool
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?