You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid uncontrolled recursion when validating markdownlint configuration files
The project infrastructure validates the markdownlint configuration files against their JSON schema. In addition to the
repository's own markdownlint configuration file at the standard location, a reusable standardized "asset" configuration
file is hosted in the repository.
Previously, in order to provide validation coverage for all the .markdownlint.yml files in the repository, a "globstar"
was used to cause the validator to recursively search the entire file tree under the repository. That approach is
problematic because the repository contains externally maintained files (e.g., the npm packages under the node_modules
folder). Searching and validating these files is inefficient at best and the cause of spurious failures at worst. That
worst case scenario has now occurred as a file from a npm package dependency is being discovered by the validation
system and failing validation.
This is avoided by targeting the search. The chosen approach is to validate only the "asset" file. Even though this
causes the file in the root of the repository to no longer be validated directly, it continues to be indirectly
validated because the file in the root is an exact copy of the "asset" (and the repository infrastructure enforces the
sync).
0 commit comments