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

Ignore comments doesn't work #15

Closed
m99coder opened this issue Oct 22, 2014 · 3 comments
Closed

Ignore comments doesn't work #15

m99coder opened this issue Oct 22, 2014 · 3 comments

Comments

@m99coder
Copy link

Hi Daniel,

I'm using buddy.js in version 0.7.0:

./node_modules/buddy.js/bin/buddy --version

My source snippet is:

return b = Math.random() * 16, (a === 'y' ? (b & 3 | 8) : (b | 0)).toString(16); // buddy ignore: line

Calling buddy.js returns warnings:

./snippet.js:1 | return b = Math.random() * 16, (a === 'y' ? (b & 3 | 8) : (b | 0)).toString(16); // buddy ignore: line
./snippet.js:1 | return b = Math.random() * 16, (a === 'y' ? (b & 3 | 8) : (b | 0)).toString(16); // buddy ignore: line
./snippet.js:1 | return b = Math.random() * 16, (a === 'y' ? (b & 3 | 8) : (b | 0)).toString(16); // buddy ignore: line
./snippet.js:1 | return b = Math.random() * 16, (a === 'y' ? (b & 3 | 8) : (b | 0)).toString(16); // buddy ignore: line

 4 magic numbers found across 6 files

Did I miss something?

With kind regards
Marco

@danielstjules
Copy link
Owner

Replace // buddy ignore: line with // buddy ignore:line and that'll fix that! :) It's just that one extra space. I'm not doing anything fancy for matching, so it expects an exact string match. Given its behaviour, I figure this eliminates any possibility of false positives.

@m99coder
Copy link
Author

You are right. That works. Thanks.

@danielstjules
Copy link
Owner

No problem! Happy to help.

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

2 participants