Class: RosettAi::Adopter::LocalAnalysisCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/rosett_ai/adopter/local_analysis_collector.rb

Overview

Performs local structural analysis of compiled rule files without making API calls. Checks for duplicates, missing fields, and other structural issues.

Constant Summary collapse

FAIL_SEVERITIES =

Returns Severity levels that cause a check to fail.

Returns:

  • (Array)

    Severity levels that cause a check to fail.

['high', 'critical'].freeze

Instance Method Summary collapse

Instance Method Details

#analyze(files) ⇒ Hash

Perform analysis on the given files.

Parameters:

  • files (Object)

    the files

Returns:

  • (Hash)


19
20
21
22
23
24
25
26
27
# File 'lib/rosett_ai/adopter/local_analysis_collector.rb', line 19

def analyze(files)
  @findings = []
  @all_rules = {}

  collect_rules(files)
  check_duplicate_ids
  check_identical_descriptions
  build_result
end