Comments (15)
Implemented in the alpha version of jscpd
You can install npm i [email protected] -g
And mark ignores blocks in the following style:
// jscpd:ignore-start
you ignored code here
// jscpd:ignore-end
not ignored code
The comment should use in the style of languages, it can be #, //, /* */, <!-- -->
from jscpd.
+1. What about something like they have in jshint:
/* jshint ignore:start */
// Code here will be ignored by JSHint.
/* jshint ignore:end */
from jscpd.
Thank you, it is the good point, I'm going to give access to the detection process via programming API and you can filter your source before code detection.
from jscpd.
thank you, I'll look on it
from jscpd.
Awesome. I really appreciate it. This tool is super useful.
from jscpd.
I think that requiring the same modules in multiple files is so common that it should automatically be ignored.
from jscpd.
Great tool.
+1 for ignore patterns in code or automatic ignore for imports in e.g. java.
from jscpd.
jsinspect
automatically ignores require()
, but also has the same feature request... namely, to be able to mark certain sections to ignore. both of these features would be a useful feature in jscpd
.
from jscpd.
+1 for something like jshint comment-style deactivation.
from jscpd.
+1
from jscpd.
+1
from jscpd.
+1
from jscpd.
Created PR #86 for this. Added a skip-regex
option, personally would prefer the ignore/disable style comments, but I don't really have time to implement that right now.
from jscpd.
@kucherenko I think what possibility to describe excluding lines through regex pattern in one single file should be very useful. In case you need to check legacy codebase and you can't surround duplicates in each file manually.
from jscpd.
@kucherenko Has the programmatic API been implemented yet? We're facing the same thing where we'd like to ignore import ... from ...
lines.
from jscpd.
Related Issues (20)
- If the path is an absolute path, it cannot be detected HOT 6
- --format Invalid Configuration HOT 3
- "pattern" takes precedence over "ignore" HOT 2
- npmjs description not accurate
- The tokens field in duplicates is always zero HOT 1
- Adding Purescript as a supported language to jscpd
- "ignore" does not work with relative paths that don't start with a wildcard glob
- consoleFull/html reporter shows wrong code block than line number gives HOT 1
- compare a file with a directory HOT 2
- 查重
- More documentation on building, running, and debugging HOT 1
- Astro Support HOT 2
- Please add ColdFusion / CFML language support HOT 3
- Able to compare two project between them HOT 1
- Readable report with code extract HOT 1
- Sort output with respect to number of duplicate lines detected HOT 3
- PHP Multiline strings causing line number to be reported incorrectly
- Does jscpd support synchronization methods ? HOT 1
- Npm i fails during install through pre-commit hook HOT 6
- Skip files larger than a certain size HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jscpd.