Refactor potentially shared functionality into core#60
Refactor potentially shared functionality into core#60joshbouncesecurity wants to merge 11 commits intogadievron:mainfrom
Conversation
|
@danielcuthbert you can see the tests running here, the cleanup fails (probably because of permissions) but it isn't really important and could be removed. As for this refactor, not sure if this is the direction of philosophy you wanted but more like food for thought |
cf2bf9a to
5fc864c
Compare
Refactoring: Consolidate Core UtilitiesHi @danielcuthbert, this PR refactors the codebase to consolidate common utilities into the This refactor will hopefully help with some future work I am looking at doing. I have tried to include an accurate description here of the changes. Files Simply MovedThe following files were moved with 100% similarity (no content changes): LLM Module Files (4 files)
Functions Simply MovedThe following functions were moved from their original locations to new From packages/static-analysis/scanner.py
Functions RefactoredThe following functions were refactored during the move. All changes were made to maintain compatibility with previous implementations - existing code continues to work without modification, and enhancements preserve original behavior: Refactored Functions
New Functions AddedThe following new functions were added to support the refactoring. Most are based on existing code patterns: core/git.py
core/semgrep.py
Functions with Actual Content ChangesThe following functions had their implementation logic modified (beyond just moving or adding parameters). All changes were made to maintain compatibility with previous implementations - the modifications were necessary to unify two different implementations that had conflicting behaviors: Functions with Content Changes
Import UpdatesAll packages have been updated to import from the new Additional Tests AddedComprehensive test coverage has been added for all new New Test Files
Integration Tests AddedAdded to
Other Changes
Summary
|
|
(I would strongly suggest squash and merge :) ) |
danielcuthbert
left a comment
There was a problem hiding this comment.
I like the idea here of core being the centre and agree, but want to have another set of eyes on this given it's a big change
Fair one @danielcuthbert , who can we tag in here aside from copilot :) |
|
Not forgotten about this, doing a manual review |
|
Ok, thanks :) I think it will be a useful refactor but I am not sure the subsequent steps will work. I was hoping to get opencode sdk working with this but it seems like the python SDK is not kept updated 🤦♂️🤦♂️🤦♂️ |
Trying to move functionality that could be shared between packages into core.
Just an idea for now