Closed neilnaveen closed 2 months ago
[!CAUTION]
Review failed
The pull request is closed.
The changes involve updates across various files, adding new functionalities such as cache management, modifying existing methods, and enhancing command-line options. Notable additions include a .PHONY
declaration in the Makefile, a new clear
option in the cache command, and the implementation of RemoveAllCaches
methods across multiple storage interfaces. Additionally, the return type of the SBOM
function is altered to provide more informative feedback.
File | Change Summary |
---|---|
Makefile | Added .PHONY declaration for specified targets. |
cmd/cache/cache.go | Introduced clear field in options struct; modified AddFlags and Run methods. |
pkg/tools/ingest/sbom.go | Changed SBOM function return type to (int, error) ; added helper functions for progress. |
pkg/graph/cache.go | Added todoFuturePair struct and getTodoAndFutureNodesCached function for caching efficiency. |
pkg/graph/mockGraph.go | Added RemoveAllCaches method to MockStorage struct. |
pkg/graph/storage.go | Introduced RemoveAllCaches method in Storage interface. |
pkg/storages/redis_storage.go | Modified SaveNode key formatting; added RemoveAllCaches method to RedisStorage struct. |
pkg/tools/ingest/sbom_test.go | Updated TestIngestSBOM to capture return value from SBOM function. |
pkg/tools/weightedNACD/riskCalculation.go | Changed node type check from "PACKAGE" to "library" in WeightedNACD function. |
pkg/tools/weightedNACD/riskCalculation_test.go | Updated node types from "PACKAGE" to "library" in tests. |
sequenceDiagram
participant User
participant CacheCommand
participant Storage
User->>CacheCommand: Run with --clear
CacheCommand->>Storage: RemoveAllCaches()
Storage-->>CacheCommand: Success
CacheCommand-->>User: Cache cleared successfully
sequenceDiagram
participant User
participant SBOMFunction
participant ProgressHelper
User->>SBOMFunction: Call with sbomPath
SBOMFunction->>ProgressHelper: Format progress
SBOMFunction-->>User: Return (count, error)
π° In a world of code so bright,
I hop with joy, what a delight!
Caches cleared and flags declared,
With every change, my heart is bared.
Let's celebrate with leaps and bounds,
For in this code, true magic sounds!
π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 40.98361%
with 36 lines
in your changes missing coverage. Please review.
Files with missing lines | Coverage Ξ | |
---|---|---|
pkg/tools/weightedNACD/riskCalculation.go | 62.79% <100.00%> (ΓΈ) |
|
pkg/graph/cache.go | 68.18% <80.00%> (ΓΈ) |
|
pkg/tools/ingest/sbom.go | 68.18% <76.19%> (ΓΈ) |
|
pkg/graph/mockGraph.go | 78.35% <0.00%> (ΓΈ) |
|
pkg/storages/redis_storage.go | 31.90% <0.00%> (ΓΈ) |
Summary by CodeRabbit
New Features
--clear
.Bug Fixes
Documentation
Refactor