CheckSources is a preprocessor that checks the project’s chapters
for missing and unmentioned files in the sources directory.
$ pip install foliantcontrib.checksources
To enable the preprocessor, add checksources
to preprocessors
section in the project config:
preprocessors:
- checksources
-
not_in_chapters
– a list of files not mentioned in the the chapters. No warnings will be displayed for the specified files. This option is useful if you don't need to add some files to the table of contents. -
strict_check
– if a critical error is detected, the build will be failed after applying the preprocessor. Several checks are supported:not_exist
– checking the existence of the file. Checks if the file specified in chapters exists;duplicate
– checking for duplicate in the chapters.
To disable strict check, use
strict_check: false
. And in order to enable all available checks, usestrict_check: true
.
Example of options:
preprocessors:
- checksources:
not_in_chapters:
- tags.md
strict_check:
- not_exist