chore: address Sonar scan findings#137
Conversation
Signed-off-by: Will Killian <wkillian@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (4)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (23)crates/node/**📄 CodeRabbit inference engine (.agents/skills/test-node-binding/SKILL.md)
Files:
crates/{python,ffi,node,wasm}/**/*⚙️ CodeRabbit configuration file
Files:
{crates/**/tests/**,python/tests/**,go/nemo_flow/**/*_test.go}⚙️ CodeRabbit configuration file
Files:
**/*.rs📄 CodeRabbit inference engine (.agents/skills/test-ffi-surface/SKILL.md)
Files:
**/*.{rs,go,js,ts,tsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{rs,py,go,js,ts,tsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{js,ts,tsx,jsx,py,rs,go,java,c,cpp,h,cc,cxx,cs,rb,php,swift,kt}📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Files:
**/*.{py,js,ts,tsx,go,rs,md}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
**/*.{rs,py,js,ts,tsx,go}📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
go/nemo_flow/**/*.go📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)
Files:
**/*.go📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*.{md,markdown,py,sh,bash,js,ts,java,cpp,go,rust}📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)
Files:
{crates/adaptive/**,python/nemo_flow/{adaptive,plugin}.py,go/nemo_flow/{adaptive,**}/*.go,**/*.{ts,js,wasm}}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
{crates/adaptive/**/*.rs,python/nemo_flow/adaptive.py,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{helper,constructor,builder}.{ts,tsx,js}}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{plugin,lifecycle}.{ts,tsx,js}}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
{crates/adaptive/**/*.rs,python/nemo_flow/plugin.py,go/nemo_flow/**/*.go,**/{context,plugin}.{ts,tsx,js,rs}}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
{docs/**,examples/**,crates/adaptive/**,python/nemo_flow/**,go/nemo_flow/**,**/{example,component}.{ts,tsx,js,rs,py,go}}📄 CodeRabbit inference engine (.agents/skills/maintain-optimizer/SKILL.md)
Files:
go/**/*.go📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
go/nemo_flow/**/*⚙️ CodeRabbit configuration file
Files:
crates/{core,adaptive}/**📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)
Files:
{crates/core,crates/adaptive}/**/*.rs📄 CodeRabbit inference engine (.agents/skills/test-wasm-binding/SKILL.md)
Files:
crates/core/**/*.rs📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)
Files:
crates/{core,adaptive}/**/*.rs⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (8)
WalkthroughThis PR contains four independent refactoring changes across Rust, JavaScript, and Go: guardrail predicate registration uses ChangesGuardrails and test refactoring
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
|
/merge |
Overview
Address the current Sonar scan findings by tightening the reported test and Guardrails validation code, and include the small CLI coverage-test API update needed to keep Rust validation green.
Details
structuredClone.EmitEvent failed: %vtest literal.BoxtoArcto match the current registry API and unblock Rust validation.Validation:
cargo test -p nemo-flow nemo_guardrailsjust test-gojust test-nodejust test-rustWhere should the reviewer start?
Start with
crates/core/src/plugins/nemo_guardrails/plugin_component.rs, where the Sonar cognitive-complexity issue is resolved without changing diagnostic messages.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Tests
Refactor
Chores