Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint: CI for structure and spelling #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

stevedh
Copy link
Contributor

@stevedh stevedh commented Apr 12, 2023

Here is another concept of how to add a post-commit hook which validates the structure.

I took my best guess about the YAML structure, so I'm sure it could be refined; but it definitely helps with any YAML indentation issues or typeos in keys.

This commit starts to add additional linting for the OAP, in order to
validate the structure and content of the documents.  There are two
pieces to this commit:

 * Structural linting uses yamale to validate the OAP data against
   yaml schema for equipment, points, and tags files.  The schemas are
   based on the actual data present and so might not be exactly what
   the designers intended; but prevent indentation errors.
 * Spellchecking runs cspell on the text.  Identifiers and other words must be
   added to lint/ids.txt or the build will fail.
 * Two github workflows which run these linters on commit.

In the future, we should add additional check; eg to ensure each point
has a definition (see OntologyAlignmentProject#2); but until that issue is closed the test
would fail anyways.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant