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

Added code to trigger rescan of entire tree upon file removal to clea… #496

Merged
merged 3 commits into from Apr 21, 2024

Conversation

brian-doherty
Copy link
Contributor

…n as needed.

@brian-doherty
Copy link
Contributor Author

@sentriz FYI the linter failed with a bunch of tar errors that I don't think have anything to do with my change. Do you have any idea what happened?

@sentriz
Copy link
Owner

sentriz commented Apr 20, 2024

ooh nice one , looks good 👍

also think we can just ScanAndClean(ScanOptions{}) since IsFull will be initialised to false anyway

@sentriz FYI the linter failed with a bunch of tar errors that I don't think have anything to do with my change. Do you have any idea what happened?

yeah musttag, would you mind excluding that rule/linter from the .golangci lint config? I'm only on my phone atm

@sentriz
Copy link
Owner

sentriz commented Apr 20, 2024

this guy can go

- musttag

@brian-doherty
Copy link
Contributor Author

I made the change but lint is still failing with a ton of "Cannot open: File exists" errors. Here's how it starts:

Checking for go.mod: go.mod
Received 237012410 of 241206714 (98.3%), 225.8 MBs/sec
Cache Size: ~230 MB (241206714 B)
/usr/bin/tar -xf /home/runner/work/_temp/1e007a1e-b75a-464f-8a56-96a109222e67/cache.tzst -P -C /home/runner/work/gonic/gonic --use-compress-program unzstd
Received 241206714 of 241206714 (100.0%), 114.9 MBs/sec
/usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/LICENSE: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/.github/workflows/test.yml: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/README.md: Cannot open: File exists
Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/cmd/protoc-gen-go/annotation_test.go: Cannot open: File exists
Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/cmd/protoc-gen-go/main.go: Cannot open: File exists
Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.0/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go: Cannot open: File exists

@brian-doherty
Copy link
Contributor Author

And here is the final error:

Running [/home/runner/go/bin/golangci-lint run --out-format=github-actions --timeout=5m] in [] ...
Error: File is not gofmt-ed with -s (gofmt)

Error: issues found
Ran golangci-lint in 3437ms

@sentriz
Copy link
Owner

sentriz commented Apr 20, 2024

yeah it always prints those errors not sure why. I think you just need to rum gofmt

@brian-doherty
Copy link
Contributor Author

Excuse my ignorance, but run gofmt where?

@sentriz
Copy link
Owner

sentriz commented Apr 20, 2024

try $ gofmt -w scanner/scanner.go

@brian-doherty
Copy link
Contributor Author

That did it! Thanks!

@sentriz sentriz merged commit 93ce039 into sentriz:master Apr 21, 2024
1 check passed
@sentriz
Copy link
Owner

sentriz commented Apr 21, 2024

thanks!

@brian-doherty brian-doherty deleted the scanondelete branch April 21, 2024 15:49
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.

None yet

2 participants