text-runner
text-runner copied to clipboard
Optional warning for orphaned files
When working on isolated documentation without inbound links I want to be notified about files that aren't linked to from within the documentation So that my documentation does not accumulate hidden cruft and all files are relevant.
- if the
rootsoption lists files, all other files that are not linked to cause an error - this checks Markdown and image files
- the configuration file allows to list files that can be orphaned, like licenses etc
Scenario: orphaned file
Given a runnable file "1.md"
And my source code contains the file "foo.png"
When trying to run "text-run --no-orphans"
Then the test fails with:
| FILENAME | foo.png |
| ERROR MESSAGE | file foo.png is not used |
| EXIT CODE | 1 |