Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test files are included in the output #48

Open
rafaelrozon opened this issue Feb 18, 2024 · 0 comments
Open

Test files are included in the output #48

rafaelrozon opened this issue Feb 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rafaelrozon
Copy link

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 rafaelrozon added the bug Something isn't working label Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant