Ignore lines that match a pattern
See original GitHub issueFor example, I’d like to ignore require statements and module.export statements since those are repetitive by nature.
Example, the following code is duplicated in two of my files, but I think that’s perfectly fine:
var
_ = require('underscore'),
Backbone = require('backbone'),
LayoutView = require('LayoutView'),
Moment = require('moment'),
appVent = require('appVent'),
format = require('format'),
pluginAPI = require('pluginAPI'),
personalAccountAppsTemplate = require('personalAccountAppsTemplate'),
personalAccountAppsListEmptyTemplate = require('personalAccountAppsListEmptyTemplate'),
Issue Analytics
- State:
- Created 9 years ago
- Reactions:6
- Comments:15 (4 by maintainers)
Top Results From Across the Web
awk - completely ignore lines that start with a specific pattern
To ignore some lines on a line-by-line basis, add /unwanted pattern/ {next} or ! /wanted pattern/ {next} at the beginning of the script....
Read more >Ignore specific lines when matching with a regex
I'm trying to make a regex that matches a specific pattern, but I want to ignore lines starting with a # . How...
Read more >How does git diff --ignore-matching-lines work
The --ignore-matching-lines and other similar flags only work when git is actually comparing the content of the files. When passing --name-only ...
Read more >Ubuntu Manpage: git-grep - Print lines matching a pattern
This is the default. -i, --ignore-case Ignore case differences between the patterns and the files. -I Don't match the pattern in binary files....
Read more >Exclude lines in less (or journalctl) - Raymii.org
You can exclude certain lines that match one or multiple words (or a regex) with a few keystrokes, once less is open.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Implemented in the alpha version of jscpd
You can install
npm i jscpd@1.0.0-alpha.2 -g
And mark ignores blocks in the following style:
The comment should use in the style of languages, it can be
#, //, /* */, <!-- -->
+1. What about something like they have in jshint: