Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File fingerprinting and save to file #129

Merged
merged 12 commits into from
Oct 18, 2023
Merged

File fingerprinting and save to file #129

merged 12 commits into from
Oct 18, 2023

Conversation

emilwareus
Copy link
Contributor

No description provided.

@emilwareus emilwareus changed the title fingerprint files with md5 and save to file File fingerprinting and save to file Oct 6, 2023
@emilwareus emilwareus marked this pull request as draft October 7, 2023 10:01
@emilwareus emilwareus self-assigned this Oct 7, 2023
@emilwareus emilwareus requested review from sweoggy and ProgHaj October 7, 2023 12:43
@emilwareus emilwareus force-pushed the fingerprinting branch 2 times, most recently from 3a08735 to 234716d Compare October 10, 2023 11:30
@emilwareus emilwareus marked this pull request as ready for review October 10, 2023 11:32
Copy link
Collaborator

@ProgHaj ProgHaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well overall, minor problems with symlinks + sometimes the resulting fingerprints.wfp is 0 bytes even though it doesn't return any error

internal/file/fingerprint.go Outdated Show resolved Hide resolved
internal/file/fingerprint.go Outdated Show resolved Hide resolved
internal/file/fingerprint.go Outdated Show resolved Hide resolved
internal/resolution/pm/pip/cmd_factory.go Outdated Show resolved Hide resolved
internal/resolution/scheduler.go Show resolved Hide resolved
internal/scan/scanner.go Show resolved Hide resolved
func TestMapEnvToOptions(t *testing.T) {

for _, co := range cases {
c := co
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a reorder of cases being outside of the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codescene doesn't like long functions. That is essentially why I did this.

internal/tui/spinner_manager.go Show resolved Hide resolved
internal/file/fingerprint.go Outdated Show resolved Hide resolved
Copy link
Member

@sweoggy sweoggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from Magnus comments, looking good to me!

internal/cmd/scan/scan.go Show resolved Hide resolved
@ProgHaj
Copy link
Collaborator

ProgHaj commented Oct 13, 2023

Lgtm as well now!

@sweoggy sweoggy marked this pull request as draft October 13, 2023 14:06
@sweoggy
Copy link
Member

sweoggy commented Oct 13, 2023

Let's put this as draft, meanwhile we work on the backend

@github-actions
Copy link

CodeScene PR Check


View detailed results in CodeScene

Code Health Quality Gates ✅ OK
Recommended Review Level Detailed -- Increased risk for defects: The change involves more modules and modified lines of code than 95% of the historic high-risk change sets. The risk is somewhat lower due to an experienced author.
Declining Code Health 2 findings(s) 🚩
Improving Code Health 1 findings(s) ✅
Affected Hotspots 2 files(s) 🔥

🚩 Declining Code Health (highest to lowest):

  • String Heavy Function Arguments fingerprint.go
  • Complex Method fingerprint_test.go: TestShouldProcessFile

✅ Improving Code Health:

  • Large Method scanner_test.go: TestMapEnvToOptions 🔥

@sweoggy sweoggy marked this pull request as ready for review October 18, 2023 08:19
@sweoggy sweoggy merged commit 2712cae into main Oct 18, 2023
8 checks passed
@sweoggy sweoggy deleted the fingerprinting branch October 18, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants