emerge icon indicating copy to clipboard operation
emerge copied to clipboard

Test files are included in the output

Open rafaelrozon opened this issue 1 year ago • 0 comments

Describe the bug I'm trying to exclude test files and other kinds of files from the output graph, but they are always present.

Describe your environment

  • Are you using the tool on macOS or linux? macOS
  • Which Python version are you using? Python 3.9.6
  • Which browser (with version) are you using? Chrome 121.0.6167.184
  • Are you scanning a public source code repository that you can provide? I tried this in a private repo and in a public repo. The results were the same. This is the public repo I used for testing: https://github.com/resend/react-email
  • If not - can you provide code snippets where or further information on the data that might be relevant for the bug?

To Reproduce Steps to reproduce the behavior:

  1. Create a config like
project_name: react-email-analysis
loglevel: info
analyses:
- analysis_name: react email analysis
  source_directory:  /tmp/emerge/packages
  only_permit_languages:
  - typescript
  only_permit_file_extensions:
  - .ts
  - .tsx
  ignore_files_containing:
  - .spec.tsx
  ignore_dependencies_matching:
  - (.*)\.spec\.tsx
  file_scan:
  - number_of_methods
  - source_lines_of_code
  - dependency_graph
  - fan_in_out
  - louvain_modularity
  - tfidf
  export:
  - directory:  /tmp/emerge/export
  - graphml
  - json
  - tabular_file
  - tabular_console_overall
  - d3
  1. Run the tool
docker run --rm -v <full path to the root of the project cloned on machine>:/tmp/emerge achtelik/emerge:2.0.0 /tmp/emerge/config.yml
  1. Once emerge is done, open the emerge.html page generated
  2. See that test files (.spect.tsx) are in the graph

Expected behavior Any file filtered by the config options ignore_files_containing and ignore_dependencies_matching is not present in the output.

Screenshots Screenshot 2024-02-18 at 07 03 58

Additional context Add any other context about the problem here.

Thanks!

rafaelrozon avatar Feb 18 '24 15:02 rafaelrozon