diff --git a/rubocop/formatter/todo_formatter.rb b/rubocop/formatter/todo_formatter.rb
index 912ce0da2cc730bb79183b46db0b6e2e56f6dd28..9e20a95ba85ab8f436ee1930a630b5271de51320 100644
--- a/rubocop/formatter/todo_formatter.rb
+++ b/rubocop/formatter/todo_formatter.rb
@@ -23,8 +23,8 @@ class TodoFormatter < BaseFormatter
       # with offenses.
       #
       # See https://gitlab.com/gitlab-org/gitlab/-/issues/415330#caveats
-      # on why the entry must end with `.html.haml.rb`.
-      RETAIN_EXCLUSIONS = %r{\.html\.haml\.rb$}
+      # on why the entry must end with `.haml.rb`.
+      RETAIN_EXCLUSIONS = %r{\.haml\.rb$}
 
       class << self
         attr_accessor :base_directory
diff --git a/spec/rubocop/formatter/todo_formatter_spec.rb b/spec/rubocop/formatter/todo_formatter_spec.rb
index fdd6117d0e6d9811560b48b4e4a38bb3376e689f..55a641982895da4936f332a6859d858c1cc26f8d 100644
--- a/spec/rubocop/formatter/todo_formatter_spec.rb
+++ b/spec/rubocop/formatter/todo_formatter_spec.rb
@@ -106,6 +106,8 @@ def run_formatter
             Exclude:
               - 'd.rb'
               - 'app/views/project.html.haml.rb'
+              - 'app/views/project.haml.rb'
+              - 'app/views/project.text.haml.rb'
               - 'app/views/unrelated.html.haml.rb.ext'
               - 'app/views/unrelated.html.haml.ext'
               - 'app/views/unrelated.html.haml'
@@ -122,7 +124,9 @@ def run_formatter
           B/TooManyOffenses:
             Exclude:
               - 'a.rb'
+              - 'app/views/project.haml.rb'
               - 'app/views/project.html.haml.rb'
+              - 'app/views/project.text.haml.rb'
               - 'c.rb'
         YAML
       end