Merged
Conversation
EPUBCheck used to report any resource found in the the container but not listed in the manifest as a warning (since #58 was fixed, in v1.1). But the EPUB specification does not require that. This commit downgrades the severity of `OPF-003` to a usage report. See also #1452 See also w3c/epub-specs#563
Member
Author
|
@mattgarrish hang on before reviewing this, the logic is broken. |
This PR introduces a new usage message (`OPF-097`) reported when the manifest includes a resource for which no reference was found in content. This is legit for instance for exempt resources (like data files included in the container). But it is likely an author error otherwise, so reporting a usage message can help to detect that. We do not report an error since: - references can be added via scripting, so the check can only be informative for scripted content - EPUBCheck historically required all container resources to be listed in the manifest (not doing so was reported as a warning, `OPF-003`), which is conflicting with a requirement to **not** list unsused resources Close #1452
be7b1e3 to
09244a4
Compare
mattgarrish
approved these changes
Jan 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tries to clarify how we check resources listed in the manifest.
Basically:
OPF-003), instead of a warningmanifestbut for which no reference were found are reported as a usage (newOPF-097)feat: report as a usage when no reference were found to manifest items
This commit introduces a new usage message (
OPF-097) reported when themanifest includes a resource for which no reference was found in content.
This is legit for instance for exempt resources (like data files included
in the container). But it is likely an author error otherwise, so reporting
a usage message can help to detect that.
We do not report an error since:
informative for scripted content
in the manifest (not doing so was reported as a warning,
OPF-003),which is conflicting with a requirement to not list unsused
resources
Close #1452
feat: report as usage container resources not listed in manifest
EPUBCheck used to report any resource found in the the container but not
listed in the manifest as a warning (since #58 was fixed, in v1.1). But
the EPUB specification does not require that.
This commit downgrades the severity of
OPF-003to a usage report.See also #1452
See also w3c/epub-specs#563