finos / git-proxy

Deploy custom push protections and policies on top of Git
https://git-proxy.finos.org
Apache License 2.0
110 stars 72 forks source link

chore: added a CI step to detect unused dependencies #592

Closed divinetettey closed 3 months ago

divinetettey commented 4 months ago

adding this PR to resolve this issue Implement a CI step to detect unused dependencies 📦

The changes include:

  1. installing the depcheck package
  2. Running depcheck --oneline --skip-missing
  3. Fail if the the check fails
linux-foundation-easycla[bot] commented 4 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

netlify[bot] commented 4 months ago

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
Latest commit d4110dc5f444e55fbc71bec8afd8551c2187c410
Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/6671832eace2b600082ae6be
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 57.39%. Comparing base (0ba98b2) to head (d4110dc).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #592 +/- ## ======================================= Coverage 57.39% 57.39% ======================================= Files 46 46 Lines 1582 1582 ======================================= Hits 908 908 Misses 674 674 ```

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

JamieSlome commented 3 months ago

@divinetettey - is there any chance we can move the check to its own workflow file? What do you think?

divinetettey commented 3 months ago

@divinetettey - is there any chance we can move the check to its own workflow file? What do you think?

I think that's fine, we can go with that approach

JamieSlome commented 3 months ago

@divinetettey - thanks for making the adjustments (perfect 🎉 ). It seems like the depcheck is reporting that concurrently and a few other devDependencies are unused which is not the case. Is there any way to add these to an allow list or as permissible exceptions?

divinetettey commented 3 months ago

@divinetettey - thanks for making the adjustments (perfect 🎉 ). It seems like the depcheck is reporting that concurrently and a few other devDependencies are unused which is not the case. Is there any way to add these to an allow list or as permissible exceptions?

I have added them to the ignore list. I would take a deep dive into how depcheck performs the checks

JamieSlome commented 3 months ago

@maoo - can we make unused dependencies required on status checks to main please?

maoo commented 3 months ago

@maoo - can we make unused dependencies required on status checks to main please?

Done!