Skip to content

Simplify redundant sensitive argument detection functions in runner.rs #51

@coderabbitai

Description

@coderabbitai

Problem

In src/runner.rs, the functions contains_sensitive_keyword and is_sensitive_arg create unnecessary indirection. The is_sensitive_arg function simply delegates to contains_sensitive_keyword without adding any value or functionality.

Proposed Solution

Combine these functions into a single is_sensitive_arg function that directly contains the logic for detecting sensitive keywords ("password", "token", "secret") in command-line arguments.

This will:

  • Reduce code complexity
  • Eliminate unnecessary function call overhead
  • Improve code readability and maintainability

Context

This issue was identified during code review of PR #45 which adds verbose logging functionality.

References:

Requested by: @leynos

Metadata

Metadata

Assignees

Labels

lowAin't annoying anyone but the QA department

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions