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

Add rule to check for irregular spaces #76

Merged
merged 1 commit into from Oct 25, 2019

Conversation

sblaisot
Copy link
Contributor

@sblaisot sblaisot commented Oct 23, 2019

This PR adds a rule to check if state contains irregular spaces as discussed under #74.
Irregular spaces are usually unneeded and unwanted.

List taken from similar ESLint rule.

@roaldnefs
Copy link
Member

Thanks @sblaisot for the PR!

Maybe the non-braking space isn't the only irregular whitespace we want to look for. Would it be possible to update this rule with other characters and rename it to NonIrregularWhitespaceRule? Besides possible parsing errors the irregular whitespace also make code harder to debug in a similar nature to mixed tabs and spaces.

We might take the no-irregular-whitespace from ESLint: https://eslint.org/docs/rules/no-irregular-whitespace as an example.

@sblaisot sblaisot changed the title Add rule to check for non-breakable spaces Add rule to check for irregular spaces Oct 24, 2019
@sblaisot
Copy link
Contributor Author

ok, I updated to detect all Irregular Spaces

@roaldnefs
Copy link
Member

Thanks @sblaisot for updating the rule! I'm going the merge the pull request but might update it to include https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#yaml-supports-only-plain-ascii before the next release.

@roaldnefs roaldnefs merged commit 29c24c2 into warpnet:master Oct 25, 2019
This was referenced Nov 1, 2019
@sblaisot sblaisot deleted the no_nbsp_rule branch July 19, 2022 14:09
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.

None yet

2 participants