"Static-Analysis" Job Fails - Rubocop
Job static-analysis
is consistently failing on multiple pipelines.
Recent Example
https://gitlab.com/gitlab-org/gitlab-ee/pipelines/42763756
https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/143678254
Reproduce Locally
bundle exec rubocop --parallel
See the following error
ee/lib/gitlab/database/load_balancing/resolver.rb:1:1: C: Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
require 'net/dns'
^
Proposed solution
Add the line # frozen_string_literal: true
to the top of the file ee/lib/gitlab/database/load_balancing/resolver.rb