Stop makefile from calling linkml validate with nonexistent config files #91

Merged
adina merged 2 commits from make-invalid-wildcard into main 2025-08-15 10:24:52 +00:00

2 commits

Author SHA1 Message Date
4abd9b940b Stop makefile from calling linkml validate with config absent
All checks were successful
Codespell / Check for spelling errors (pull_request) Successful in 25s
Model checks / lint (pull_request) Successful in 1m42s
Validate examples and verify unmodified conversion / lint (pull_request) Successful in 2m48s
This stops the checkvalidation (checkvalid / checkinvalid) target in
the makefile, which globs for `*(in)valid.cfg.yaml` files, from
calling `linkml validate` when no files match the pattern.

Previously, if there were no *.invalid.cfg.yaml files, we still made
it into the `@for ex in $</*invalid.cfg.yaml` loop (same for `*valid`)
-- but with the glob expression verbatim, producing errors like this:

"Invalid value for '--config': File
'src/flat-data/unreleased/validation/*.invalid.cfg.yaml' does not
exist."

It seems that make's wildcard function avoids the pitfall, while
correctly expanding the globs when files are present.

This is an alternative to a solution presented in #90, which excluded
checkinvalid from checkvalidation.

https://www.gnu.org/software/make/manual/html_node/Wildcard-Function.html
2025-08-13 13:55:14 +02:00
dbd92ebea0 Fix makefile formatting
Removes three trailing spaces, which made my editor complain on save.
2025-08-13 13:55:14 +02:00