package-analysis icon indicating copy to clipboard operation
package-analysis copied to clipboard

Refactor analysis.go and worker.go to reduce duplicated code

Open maxfisher-g opened this issue 3 years ago • 2 comments

cmd/worker is used in docker-compose and production, while cmd/analyze is used for the one-shot local analysis. However, they both share the same container and contain duplicated code. This could use some refactoring.

maxfisher-g avatar Oct 20 '22 23:10 maxfisher-g

A possible refactoring strategy (from @calebbrown)

  • internal/analysis renamed to internal/dynamicanalysis
  • internal/analysis becomes new generalized API for all analysis
  • internal/staticanalysis is new static analysis work

maxfisher-g avatar Oct 21 '22 00:10 maxfisher-g

There is still common code to be refactored

maxfisher-g avatar Oct 27 '22 23:10 maxfisher-g

Fixed by #429

maxfisher-g avatar Nov 03 '22 23:11 maxfisher-g