question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setting limit through config file is not working

See original GitHub issue

given .cpd.yaml:

limit: 10

jscpd --debug outputs:

info:    ----------------------------------------
info:    Options:
info:    languages = javascript,typescript,jsx,haxe,coffeescript,ruby,php,python,css,sass,java,csharp,go,clike,htmlmixed,yaml,erlang,swift,xml,puppet,twig,vue
info:    verbose = false
info:    debug = true
info:    files = null
info:    exclude = null
info:    min-lines = 5
info:    min-tokens = 70
info:    limit = 50
info:    config_file = .cpd.yaml
info:    reporter = xml
info:    extensions = js,es,es6,ts,tsx,jsx,hx,hxml,coffee,rb,php,phtml,py,less,css,scss,java,cs,go,cpp,c,m,h,html,htm,yaml,yml,erl,erlang,swift,xml,xsl,xslt,pp,puppet,twig,vue
info:    path = ...
info:    patterns = **/*.+(js|es|es6|ts|tsx|jsx|hx|hxml|coffee|rb|php|phtml|py|less|css|scss|java|cs|go|cpp|c|m|h|html|htm|yaml|yml|erl|erlang|swift|xml|xsl|xslt|pp|puppet|twig|vue)
info:    ----------------------------------------

while jscpd --debug --limit 10 outputs:

info:    ----------------------------------------
info:    Options:
info:    languages = javascript,typescript,jsx,haxe,coffeescript,ruby,php,python,css,sass,java,csharp,go,clike,htmlmixed,yaml,erlang,swift,xml,puppet,twig,vue
info:    verbose = false
info:    debug = true
info:    files = null
info:    exclude = null
info:    min-lines = 5
info:    min-tokens = 70
info:    limit = 10
info:    config_file = .cpd.yaml
info:    reporter = xml
info:    extensions = js,es,es6,ts,tsx,jsx,hx,hxml,coffee,rb,php,phtml,py,less,css,scss,java,cs,go,cpp,c,m,h,html,htm,yaml,yml,erl,erlang,swift,xml,xsl,xslt,pp,puppet,twig,vue
info:    path = ...
info:    patterns = **/*.+(js|es|es6|ts|tsx|jsx|hx|hxml|coffee|rb|php|phtml|py|less|css|scss|java|cs|go|cpp|c|m|h|html|htm|yaml|yml|erl|erlang|swift|xml|xsl|xslt|pp|puppet|twig|vue)
info:    ----------------------------------------

other options seems like working as expected

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jenniferpluspluscommented, Apr 14, 2017

I also ran into this issue today. It seems like a simple fix, so I did it and opened a PR.

1reaction
kucherenkocommented, Apr 18, 2017

thank you, gentlemen’s

added the new version of jscpd, the new version is 0.6.11

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix maximum upload and php memory limit issues in ...
Check your current system settings​​ First of all, check your current server memory settings. In the Customizr or Customizr Pro WordPress themes, ...
Read more >
How to Fix the upload_max_filesize Error in WordPress
Navigate to your php.​​ Locate the upload_max_filesize and increase it by changing its number. You can also boost a few other limitations, as ......
Read more >
How to Resolve the WordPress Memory Limit Error (2 Methods)
Your site's current memory limit is set in its wp-config.php file, and this may or may not match up to the limit allowed...
Read more >
How to increase the max upload file size in ASP.NET?
I believe this line in the Web.config will set the max upload size: ... I've solved the problem adding this configuration in the...
Read more >
How to set limits for services in RHEL 7 and systemd
I have Veritas cluster running which starts tons of applications thru it and limits are not placed. How can I configure what? Configuring...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found