Fraunhofer-AISEC / cpg

A library to extract Code Property Graphs from C/C++, Java, Go, Python, Ruby and every other language through LLVM-IR.
https://fraunhofer-aisec.github.io/cpg/
Apache License 2.0
290 stars 62 forks source link

Add exclusion filter for directories #1828

Open lshala opened 3 weeks ago

lshala commented 3 weeks ago

This PR adds the possibility to exclude folders or files from the analysis. Specifically, it should be possible to filter either by strings or by regex.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.

Project coverage is 76.17%. Comparing base (2b0474a) to head (2db0ff3). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...e/fraunhofer/aisec/cpg/TranslationConfiguration.kt 63.63% 4 Missing :warning:
...tlin/de/fraunhofer/aisec/cpg/TranslationManager.kt 66.66% 2 Missing :warning:
...s/kotlin/de/fraunhofer/aisec/cpg/test/TestUtils.kt 50.00% 0 Missing and 1 partial :warning:
Additional details and impacted files | [Files with missing lines](https://app.codecov.io/gh/Fraunhofer-AISEC/cpg/pull/1828?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fraunhofer-AISEC) | Coverage Δ | | |---|---|---| | [...s/kotlin/de/fraunhofer/aisec/cpg/test/TestUtils.kt](https://app.codecov.io/gh/Fraunhofer-AISEC/cpg/pull/1828?src=pr&el=tree&filepath=cpg-core%2Fsrc%2FtestFixtures%2Fkotlin%2Fde%2Ffraunhofer%2Faisec%2Fcpg%2Ftest%2FTestUtils.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fraunhofer-AISEC#diff-Y3BnLWNvcmUvc3JjL3Rlc3RGaXh0dXJlcy9rb3RsaW4vZGUvZnJhdW5ob2Zlci9haXNlYy9jcGcvdGVzdC9UZXN0VXRpbHMua3Q=) | `70.21% <50.00%> (-1.37%)` | :arrow_down: | | [...tlin/de/fraunhofer/aisec/cpg/TranslationManager.kt](https://app.codecov.io/gh/Fraunhofer-AISEC/cpg/pull/1828?src=pr&el=tree&filepath=cpg-core%2Fsrc%2Fmain%2Fkotlin%2Fde%2Ffraunhofer%2Faisec%2Fcpg%2FTranslationManager.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fraunhofer-AISEC#diff-Y3BnLWNvcmUvc3JjL21haW4va290bGluL2RlL2ZyYXVuaG9mZXIvYWlzZWMvY3BnL1RyYW5zbGF0aW9uTWFuYWdlci5rdA==) | `71.64% <66.66%> (-0.16%)` | :arrow_down: | | [...e/fraunhofer/aisec/cpg/TranslationConfiguration.kt](https://app.codecov.io/gh/Fraunhofer-AISEC/cpg/pull/1828?src=pr&el=tree&filepath=cpg-core%2Fsrc%2Fmain%2Fkotlin%2Fde%2Ffraunhofer%2Faisec%2Fcpg%2FTranslationConfiguration.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fraunhofer-AISEC#diff-Y3BnLWNvcmUvc3JjL21haW4va290bGluL2RlL2ZyYXVuaG9mZXIvYWlzZWMvY3BnL1RyYW5zbGF0aW9uQ29uZmlndXJhdGlvbi5rdA==) | `89.71% <63.63%> (-1.46%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: