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.