Skip to content

Add a yaml format util for handling formatting#65

Merged
vishnoianil merged 1 commit intoinstructlab:mainfrom
nerdalert:yaml-fmt-nulls
Jul 11, 2024
Merged

Add a yaml format util for handling formatting#65
vishnoianil merged 1 commit intoinstructlab:mainfrom
nerdalert:yaml-fmt-nulls

Conversation

@nerdalert
Copy link
Member

  • Handle null values as custom blank entries. js-yaml doesn't offer a config knob for empty values so this extends it to replace all single and double quotes along with a null value to be an empty line.

Closes #62

- Handle null values as custom blank entries. js-yaml
doesn't offer a config knob for empty values so this extends
it to replace all single and double quotes along with a null
value to be an empty line.

Signed-off-by: Brent Salisbury <bsalisbu@redhat.com>
@nerdalert nerdalert requested a review from vishnoianil July 11, 2024 16:38
@nerdalert
Copy link
Member Author

@vishnoianil this should work but I don't have the linter workflow on my test repo so I'm not positive but here is an output: https://github.com/brents-pet-robot/taxonomy-sub-testing/pull/131/files

Note the quotes that are added on values like answer: '425' are due to white spaces.

Copy link
Member

@vishnoianil vishnoianil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vishnoianil vishnoianil merged commit cac36a8 into instructlab:main Jul 11, 2024
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.

Amend skill doesn't populate the yaml properly

2 participants