Commit ca51b81f authored by Matias Alvarez's avatar Matias Alvarez
Browse files

fix: Remove the exception message because it's ignored and add an explanation

parent b0a0186a
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -101,7 +101,9 @@ module Labkit
            warn baseline_generation_message(new_offenses)
          else
            warn report_new_offenses(new_offenses)
            raise SystemExit.new(2), "New LabKit logging offenses detected"
            # Raise with exit code 2 to bypass the RSpec retry mechanism
            # See https://gitlab.com/gitlab-org/quality/tooling/labkit-spec/-/work_items/2
            raise SystemExit.new(2)
          end
        end

@@ -175,3 +177,11 @@ module Labkit
end

Labkit::Logging::FieldValidator.inject!

# Limit failures to MRs that introduce logging
# Use AI: Point to failing MR and MR that was supposed to fix it.
# 
# When an rspec fails, it is retried but only with rspec failures.
# So no Rspec is run in the second run.
# 
# The validator fails the current Rspec but doesn't record an Rspec failure. 
 No newline at end of file