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

Warn on malformed special comments #11

Open
ashfurrow opened this issue Jul 27, 2016 · 3 comments
Open

Warn on malformed special comments #11

ashfurrow opened this issue Jul 27, 2016 · 3 comments

Comments

@ashfurrow
Copy link
Member

Specially comments to direct the user start with //#-, we should warn if the string following that doesn't match a known pattern.

screen shot 2016-07-20 at 10 03 50 am

screen shot 2016-07-20 at 10 03 24 am

screen shot 2016-07-20 at 10 03 14 am

@rhysforyou
Copy link
Contributor

rhysforyou commented Jul 27, 2016

What's the best way to implement this? Are there any nice gems that offer similar functionality to SourceKitten, or do we want to attempt to use regexps instead?

@ashfurrow
Copy link
Member Author

I was thinking regular expressions, check for /*#- and */ (or //#-\n) and see if the middle bits match a known pattern.

Gee, soon we might have to start allowing users to opt-out of some rules 🤔 But not now, we can worry about that later 😅

@rhysforyou
Copy link
Contributor

Yeah at some point we'll probably want to break 'rules' out into their own discrete objects to make that stuff easier, but we'll see how far we can get before that refactor's necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants