Class: FiberAudit::Audit
- Inherits:
-
Object
- Object
- FiberAudit::Audit
- Defined in:
- lib/fiber_audit/audit.rb
Overview
Wave R4 WP-7: Audit coordinator.
Orchestrates the complete static analysis workflow:
1. Expand/clean root
2. Resolve target files (include/exclude globs, Ruby only, sorted, deduped)
3. Build SemanticIndex(root:)
4. Extract call sites with absolute paths (unchanged)
5. Copy call sites and parse errors to root-relative paths (portable)
6. Resolve execution contexts on root-relative call sites
7. Parse inline suppressions with root-relative paths
8. Parse YAML suppressions (relative to root unless absolute)
9. Run enabled rules via Collection publication
- Apply suppressions and min_severity filter
- Determine status and build immutable Result
Defined Under Namespace
Constant Summary collapse
- STATUS_FAIL =
Status constants
'FAIL'- STATUS_REVIEW =
'REVIEW'- STATUS_PASS_WITH_WARNINGS =
'PASS_WITH_WARNINGS'- STATUS_NO_FINDINGS =
'NO_FINDINGS'
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration:, root:) ⇒ Audit
constructor
A new instance of Audit.
Constructor Details
#initialize(configuration:, root:) ⇒ Audit
Returns a new instance of Audit.
46 47 48 49 50 51 52 53 |
# File 'lib/fiber_audit/audit.rb', line 46 def initialize(configuration:, root:) @configuration = configuration = Pathname.new(root)..cleanpath raise ArgumentError, "audit root is not a directory: #{}" unless .directory? @root = .realpath freeze end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
55 56 57 |
# File 'lib/fiber_audit/audit.rb', line 55 def root @root end |
Instance Method Details
#call ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/fiber_audit/audit.rb', line 57 def call pipeline = run_pipeline active, suppressed = pipeline.fetch(:store).apply(pipeline.fetch(:findings)) filtered_active = filter_by_severity(active) filtered_suppressed = filter_by_severity(suppressed) build_result(pipeline, filtered_active, filtered_suppressed) end |