Feature : Add Incremental Analysis#171
Merged
sourya-deepsource merged 17 commits intoDeepSourceCorp:masterfrom Mar 26, 2025
Merged
Feature : Add Incremental Analysis#171sourya-deepsource merged 17 commits intoDeepSourceCorp:masterfrom
sourya-deepsource merged 17 commits intoDeepSourceCorp:masterfrom
Conversation
Contributor
unnxt30
commented
Mar 19, 2025
- Removed methods not necessary from the original PR
- Refactored the Cli interface to include the incremental analysis flag
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
sourya-deepsource
requested changes
Mar 24, 2025
pkg/cli/cli.go
Outdated
| }, | ||
|
|
||
| &cli.StringFlag{ | ||
| Name: "Incremental Analyzer", |
Contributor
There was a problem hiding this comment.
Suggested change
| Name: "Incremental Analyzer", | |
| Name: "Analyze changeset", |
pkg/cli/cli.go
Outdated
| Config *config.Config | ||
| Checkers []analysis.Checker | ||
| Config *config.Config | ||
| IncMode *IncrementalConfig |
Contributor
There was a problem hiding this comment.
Run go fmt locally before pushing.
pkg/cli/cli.go
Outdated
|
|
||
| result := checkResult{} | ||
| err := filepath.Walk(c.RootDirectory, func(path string, d fs.FileInfo, err error) error { | ||
| if c.IncMode == nil || c.IncMode.compareHash == "" { |
Contributor
There was a problem hiding this comment.
If no git revision is provided, all files should be analyzed.
pkg/cli/git.go
Outdated
| } | ||
|
|
||
| // Define references for the current and previous commits | ||
| head := "HEAD" |
Contributor
There was a problem hiding this comment.
We need a diff between the current state of the repo and the compareCommitHash. The repo state may not be clean at the time of analysis.
Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
sourya-deepsource
approved these changes
Mar 26, 2025
cd5c5d6
into
DeepSourceCorp:master
8 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.