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

Rule Request: Check that files only contain only valid characters #101

Open
rupreck opened this issue Apr 10, 2024 · 0 comments
Open

Rule Request: Check that files only contain only valid characters #101

rupreck opened this issue Apr 10, 2024 · 0 comments

Comments

@rupreck
Copy link

rupreck commented Apr 10, 2024

Under the YAML spec there are only certain characters supported however often editors add hidden characters such as non breaking spaces. Finding these would be helpful.

See: https://yaml.org/spec/1.2.2/#51-character-set

A simple regex, such as this one might be used that finds characters that are not printable unicode characters:

[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]

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

No branches or pull requests

1 participant