Styleguide/toolchain to use for YAML linting/repairing #2177
Replies: 4 comments
-
Once the workflow has been standardized, it can be added to the BBOP best practices guide: https://berkeleybop.github.io/best_practice/ and also the |
Beta Was this translation helpful? Give feedback.
-
This is how mixs is trying to enforce YAML linting: GenomicsStandardsConsortium/mixs#808 |
Beta Was this translation helpful? Give feedback.
-
yamllint looks like a good option for functionality and ease of use. |
Beta Was this translation helpful? Give feedback.
-
I like prettier but only from the perspective that I have used it before and it is fairly straightforward to incorporate it into our current workflow. It's strength and weakness in this context is that it is configurable, i.e. you can turn on and off different rules. In the context of a style-guide and best-practice this actually makes it a bit more complex because we would also need to specify which rules, if any, we want to allow turning off. However, this can be quite beneficial for certain projects that have YAML styles that have a specific rule or two they want to operate differently. One positive that I strongly recommend in any of our solutions is something that allows per-line disabling of linting rules. Prettier has this feature and it is rather nice to just note why your skipping a rule once in a while; it often results in cleaner code. |
Beta Was this translation helpful? Give feedback.
-
All LinkML schemas are specified/authored in YAML, which like other (programming, formatting, etc.) languages out there has it's own styleguide/best practices that need to/can be followed while creating files in that format.
When this issue was raised as a discussion item at a past LinkML developers meeting, the team came up with four solutions that can be used --
We need to evaluate the pros and cons of each of the above tools and devise a standard workflow for linting (and possibly repairing) YAML files.
Beta Was this translation helpful? Give feedback.
All reactions