forked from jonschlinkert/markdown-toc
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
For the purpose of continuous integration (CI), I'd like a script that will fail (as in exit non-zero) when someone adds a new ADR record but forgets to update the table of contents.
It could look something like:
adr-log -d ./docs/adrs/ -i --disallow-changes
If that command would otherwise require updating / creating a file, it would fail. Such a failure probably indicates that the commit author forgot to re-generate the table of contents.
The current work around is something like this in a CI script:
adr-log -d ./docs/adrs/ -i
# Check to see if any files were modified and exit non-zero:
git status ...
The workaround is not too bad but it requires relying on something like git within CI and some bash magic.
As a point of reference prettier --check exists for a similar use case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels