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.

.jscpd.json does not ignore file(s)

See original GitHub issue

Describe the bug Created .jscpd.json file in the project root as it is described here. In the section “ignore” left only "**/*.md" Still getting failure with error message ERROR: jscpd found too many duplicates (35.55%) over threshold (0%)

To Reproduce Steps to reproduce the behavior:

  1. Go to branch https://github.com/aregtech/areg-sdk/tree/20211009-readme
  2. Check the content of file .jscpd.json
  3. Open to edit file README.md. Type anything is some place and commit.
  4. Wait a little bit, go to Action menu and see the result.

Expected behavior Regardless it is absolutely the root cause of the failure, but my expectation is that mega-linter ignores all *.md files.

Screenshots image

image

Desktop (please complete the following information):

  • OS: Ubuntu
  • OS Version: 20.04.3, LTS
  • NodeJS Version: I have no idea, i don’t use JS
  • jscpd version: super-linter:v4.8.1
Run github/super-linter@v4
/usr/bin/docker run --name ghcriogithubsuperlinterv481_686139 --label fa4e14 --workdir /github/workspace --rm -e VALIDATE_ALL_CODEBASE -e DEFAULT_BRANCH -e GITHUB_TOKEN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/areg-sdk/areg-sdk":"/github/workspace" ghcr.io/github/super-linter:v4.8.1
--------------------------------------------------------------------------------

Additional context image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
paulalexcommented, Oct 26, 2021

Could you confirm if this issue is affecting me? I started using this action today and I want to exclude directories from being validated:

{
    "threshold": 0,
    "ignore": [
      "**/target/**",
      "**/resources/**"
    ]
}

It seems regardless of the pattern I use I am unable to exclude files, I am not sure if this is related to this, or if I am simply doing something wrong.

3reactions
kucherenkocommented, Oct 18, 2021

will check and fix the issue, thank you for the report

Read more comments on GitHub >

github_iconTop Results From Across the Web

Superlinter .jscpd.json file ignore is not working #2198 - GitHub
Describe the bug I am trying keep to exclude the files from jscpd scanning but its not working even after correct configuration.
Read more >
jscpd/README.md - UNPKG
The CDN for jscpd. ... 38, - Default config file is `.jscpd.json`, no more `.cpd.yaml` ... 43, - Use patterns form `.gitignore` for...
Read more >
jscpd - npm
Generate XML report in pmd-cpd format, JSON report, HTML report ... In following example jscpd will analyze files *.es and *.es6 as ...
Read more >
@evgygor/jscpd - npm Package Health Analysis | Snyk
Looks like @evgygor/jscpd is missing a security policy. ... --files STRING glob pattern for find code -e, --exclude STRING directory to ignore ......
Read more >
gitignore all files except the .json files in all subdirectories of a ...
You can add the following lines to your .gitignore file: # ignore all files **/*.* # except json files in test1 folder !test1/**/*.json....
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