From 5f0fc1f24b313064781ed9303efea071f93ee31c Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Tue, 5 Dec 2023 12:50:49 +0900 Subject: [PATCH 1/2] Add `AutoCorrector` module --- gems/rubocop/1.57/rubocop.rbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gems/rubocop/1.57/rubocop.rbs b/gems/rubocop/1.57/rubocop.rbs index c21519d9..7baeb43f 100644 --- a/gems/rubocop/1.57/rubocop.rbs +++ b/gems/rubocop/1.57/rubocop.rbs @@ -27,4 +27,8 @@ module RuboCop end class ProcessedSource = AST::ProcessedSource + + module AutoCorrector + def support_autocorrect?: () -> true + end end From 81c9ef2ee8b3e39c7b0edd65afcc5dff26f78ba2 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Tue, 5 Dec 2023 12:51:08 +0900 Subject: [PATCH 2/2] Add `severity` keyword --- gems/rubocop/1.57/rubocop.rbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gems/rubocop/1.57/rubocop.rbs b/gems/rubocop/1.57/rubocop.rbs index 7baeb43f..176b2624 100644 --- a/gems/rubocop/1.57/rubocop.rbs +++ b/gems/rubocop/1.57/rubocop.rbs @@ -12,8 +12,8 @@ module RuboCop class Base extend AST::NodePattern::Macros - def add_offense: (untyped node, ?message: String) -> void | - (untyped node, ?message: String) {(Corrector) -> void} -> void + def add_offense: (untyped node, ?message: String, ?severity: Symbol) -> void | + (untyped node, ?message: String, ?severity: Symbol) {(Corrector) -> void} -> void def cop_config: () -> Hash[String, untyped] def processed_source: () -> AST::ProcessedSource end