Use the denote-lint package
The denote-lint package by Peter Smith provides facilities that check all Denote files for correctness. This is about the consistency between file name and front matter, the validity of links, and related. The package defines multiple warning levels, each with its own semantics. Learn more here: https://github.com/psmith1303/denote-lint.