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

Ability to skip 'the following section' #27

Open
jonbcampos opened this issue Oct 13, 2015 · 7 comments
Open

Ability to skip 'the following section' #27

jonbcampos opened this issue Oct 13, 2015 · 7 comments

Comments

@jonbcampos
Copy link

Similar to istanbul it would be nice to skip sections with code inserts. In my angularjs app many of the modules start with a similar 'imports' section and they are all stating they are duplicates. Yes they are, but I accept these sections and would like to focus on the meat and potatoes

@danielstjules
Copy link
Owner

Can you post a small example reproduce case? Are the imports es6 module syntax?

@jonbcampos
Copy link
Author

Not a problem:

 var listtimesheetsModule = angular.module('app.sections.timesheets.list', [
     'ui.router',
     // models
     'models.SessionModel',
     'models.TimesheetsModel',
     'models.EditableWeeksModel',
     'models.WeeksModel',
     // filters
     'common.helpers.createError',
     'app.filters.getTimesheetStatusById',
     'app.filters.getWeekLabelById'
 ]);

@danielstjules
Copy link
Owner

Thanks! Somewhat related to #26 I'll need to setup better detection of this kind of dependency-related code, as I've currently hardcoded checks for AMD/CommonJS/ES6 style modules.

@jonbcampos
Copy link
Author

Great to hear. With istanbul I can add the following tag over a function/block-of-code and it will be ignored. I'd love this same ability.

 /* istanbul ignore next */

@danielstjules
Copy link
Owner

Might be nice to have some config for this as well. Maybe skipping blocks that start with a given line? Since there's a pattern here, I'd like that better than having QA tools pollute lib code

@jonbcampos
Copy link
Author

True. While I don't like adding a lot of tags to code, it does provide
flexibility. And since it is stripped out during the build process I really
don't mind the extra lines added near my jsdoc. But I do like the idea of
specifying a specific known repeating block.
On Oct 15, 2015 2:23 AM, "Daniel St. Jules" notifications@github.com
wrote:

Might be nice to have some config for this as well. Maybe skipping blocks
that start with a given line? Since there's a pattern here, I'd like that
better than having QA tools pollute lib code


Reply to this email directly or view it on GitHub
#27 (comment)
.

@danielstjules
Copy link
Owner

Thinking about this again, would this feature ignore only the next line, or all nodes contained in that line? And thus potentially multiples lines if a node spans that many?

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