Class: QueryPackwerk::RuleRewriter

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/query_packwerk/rule_rewriter.rb,
lib/query_packwerk/rule_rewriter/base_rule.rb,
lib/query_packwerk/rule_rewriter/rule_set_rewriter.rb,
lib/query_packwerk/rule_rewriter/anonymize_arguments_rule.rb,
lib/query_packwerk/rule_rewriter/anonymize_keyword_arguments_rule.rb

Overview

Orchestrates source code rewriting using defined transformation rules. Provides an entry point for applying rule-based code transformations, particularly for anonymizing method arguments and source patterns to facilitate pattern-based violation analysis.

Defined Under Namespace

Classes: AnonymizeArgumentsRule, AnonymizeKeywordArgumentsRule, BaseRule, RuleSetRewriter

Class Method Summary collapse

Class Method Details

.rewrite(source_string) ⇒ Object



18
19
20
# File 'lib/query_packwerk/rule_rewriter.rb', line 18

def self.rewrite(source_string)
  RuleSetRewriter.new(source_string).process
end