Skip to content

Fix base linter loading warnings

Doug Stull requested to merge fix-base-linter-autoloading-warnings into master

What does this MR do?

Fixes the condition for these warnings showing when loading rails(in dev?)

15:17 $ be rails c
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19]
 GitLab:       13.8.0-pre (f589d1a8336) EE
 GitLab Shell: 13.15.0
 PostgreSQL:   11.9
--------------------------------------------------------------------------------
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:6: warning: already initialized constant Gitlab::Danger::BaseLinter::MIN_SUBJECT_WORDS_COUNT
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:6: warning: previous definition of MIN_SUBJECT_WORDS_COUNT was here
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:7: warning: already initialized constant Gitlab::Danger::BaseLinter::MAX_LINE_LENGTH
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:7: warning: previous definition of MAX_LINE_LENGTH was here
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:8: warning: already initialized constant Gitlab::Danger::BaseLinter::WIP_PREFIX
/Users/dstull/projects/gdk/gitlab/lib/gitlab/danger/base_linter.rb:8: warning: previous definition of WIP_PREFIX was here

I introduced the base_linter.rb recently and this popped up with that addition.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Doug Stull

Merge request reports

Loading