-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Fix check line alignment #638
Conversation
I can take a look at this, but I'm wondering if you might be open to adding support for an option to preserve whitespace in comment-parser--which is a small library that we are elsewhere using in our codebase and has been open to PRs? I'd feel a lot more comfortable if the rule were to instead total up whitespace counts based on parsed results rather than making ever longer, if not also harder-to-maintain or imperfect, regular expressions. This could also be potentially useful for our other rules, including fixers where we use its parser and stringifier to make modifications and where, without such whitespace-awareness, the fixers may thus drop whitespace that the user might have wanted to preserve. Thanks! |
Interesting! Yep! I'll try to take a look at this on the next days. :) |
@brettz9, I wonder if we could merge this fix for now, and when the comment-parser changes are done, we update this rule to use it. Considering that probably it can take a while, I think it'd be nice to already fix this issue here. WDYT? |
@renatho : I really don't want to introduce new code that has to be maintained with its own complexities. It is not going super fast, I know, but the project maintainer has been making progress on this new release and has been receptive to changes in the past, so I'd hold out a little bit longer. We will need those |
Hey @brettz9! I get your point. But I was thinking that maybe it could be nice to merge this one only because it's more a fix than a new feature. But if you prefer to wait a little more for this, it's okay. ;) |
🎉 This issue has been resolved in version 31.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I've gone ahead and applied your changes. For future changes, please note that Note that |
Hey @brettz9! Thank you for the quick update of the |
Some fixes for the rule
check-line-alignment
.It skips single line comments and considers types with spaces.