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

standardize sigil delimiters #195

Open
novaugust opened this issue Sep 9, 2024 · 0 comments
Open

standardize sigil delimiters #195

novaugust opened this issue Sep 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@novaugust
Copy link
Contributor

With a sigil like ~w, a codebase might use a variety of delimiters, for no reason other than the author's personal preferences.
Styler could enforce a standard for delimiters, ala our string delimiter choices.

For example:

defp style({:sigil_w, [{:delimiter, _} | meta], children}), do: {:sigil_w, [{:delimiter, "("} | meta], children}

This naive approach would break code like this though: ~w|)|, so the sigil should be evaluated for which delimiter would require the fewest escapes, and otherwise use the delimiters by preference

@novaugust novaugust added the enhancement New feature or request label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant