Coder Social home page Coder Social logo

Comments (15)

kucherenko avatar kucherenko commented on June 8, 2024 13

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.

voitau avatar voitau commented on June 8, 2024 5

+1. What about something like they have in jshint:

/* jshint ignore:start */
// Code here will be ignored by JSHint.
/* jshint ignore:end */

from jscpd.

kucherenko avatar kucherenko commented on June 8, 2024 1

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.

kucherenko avatar kucherenko commented on June 8, 2024

thank you, I'll look on it

from jscpd.

akinnee avatar akinnee commented on June 8, 2024

Awesome. I really appreciate it. This tool is super useful.

from jscpd.

akinnee avatar akinnee commented on June 8, 2024

I think that requiring the same modules in multiple files is so common that it should automatically be ignored.

from jscpd.

bosvos avatar bosvos commented on June 8, 2024

Great tool.
+1 for ignore patterns in code or automatic ignore for imports in e.g. java.

from jscpd.

potatopankakes avatar potatopankakes commented on June 8, 2024

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.

diegokogan avatar diegokogan commented on June 8, 2024

+1 for something like jshint comment-style deactivation.

from jscpd.

poligarcia avatar poligarcia commented on June 8, 2024

+1

from jscpd.

leandro-gomez avatar leandro-gomez commented on June 8, 2024

+1

from jscpd.

nahdelgado avatar nahdelgado commented on June 8, 2024

+1

from jscpd.

ryasmi avatar ryasmi commented on June 8, 2024

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.

alsheuski avatar alsheuski commented on June 8, 2024

@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.

llwt avatar llwt commented on June 8, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.