Skip to content
代码片段 群组 项目
该项目从 https://gitlab.com/gitlab-org/gitlab.git 镜像。 拉取镜像更新于
  1. 4月 09, 2024
  2. 4月 08, 2024
    • Peter Leitzen's avatar
      RSpec/HaveGitlabHttpStatus: Avoid infinite correction loop · 5ee5db48
      Peter Leitzen 创作于
      In case of `have_gitlab_http_status(-1)` we've seen an
      `RuboCop::Runner::InfiniteCorrectionLoop` error after upgrading RuboCop.
      
      This commits side-steps this problem by checking if replacement is not
      identical to the previous source version.
      5ee5db48
  3. 4月 03, 2024
    • Peter Leitzen's avatar
      Skip Migration/EnsureFactoryForTable in CE · 2bd4e811
      Peter Leitzen 创作于
      Since migrations for EE models don't have factories in CE we need to
      skip this cop in foss-only CI.
      
      This commit also simplifies the implementation and improves the
      performances be caching files operations.
      2bd4e811
  4. 3月 28, 2024
  5. 3月 22, 2024
  6. 3月 14, 2024
    • Peter Leitzen's avatar
      Add new cop Gitlab/Rails/SafeFormat · 99e2f6fe
      Peter Leitzen 创作于
      Enforce `safe_format` for externalized strings with interpolations and
      `.html_safe`.
      
        # bad
        _('string %{open}foo%{close}').html_safe % { open: '<b>'.html_safe, close: '</b>'.html_safe }
        format(_('string %{open}foo%{close}').html_safe, open: '<b>'.html_safe, close: '</b>'.html_safe)
      
        # good
        safe_format(_('string %{open}foo%{close}'), tag_pair(tag.b, :open, :close)
        # also good no `html_safe`
        format(_('string %{var} number'), var: var)
      99e2f6fe
  7. 3月 06, 2024
  8. 3月 05, 2024
  9. 2月 28, 2024
    • Doug Stull's avatar
      Discourage use of Current.organization outside of approved app layers · 3e3e7e34
      Doug Stull 创作于
      - add rubocop to lint on use of Current.organization outside
        of approved app layers.
      - see https://gitlab.com/gitlab-org/gitlab/-/issues/442751 for
        details
      
      ```
            # # bad
            # class SomeService
            #   def execute
            #     do_something_with(Current.organization)
            #   end
            # end
            #
            # # good
            # class SomeController < ApplicationController
            #   def create
            #     response = SomeService.new(organization: Current.organization).execute
            #   end
            # end
            #
            # class SomeService
            #   def initialize(organization:)
            #     @organization = organization
            #   end
            #
            #   def execute
            #     do_something_with(@organization)
            #   end
            # end
      ```
      3e3e7e34
  10. 2月 22, 2024
  11. 2月 19, 2024
    • Malcolm Locke's avatar
      Add bbm dictionary content to cop cache key · ca36bb90
      Malcolm Locke 创作于
      The BackgroundMigration/DictionaryFile relies upon the contents
      of the files in db/docs/batched_background_migrations/ as well as
      the Ruby source file of the background migration.
      
      Currently, the Rucocop results cache will not be updated if the
      contents of the docs folder changes, which leads to false positives
      and negatives.
      
      This change includes the contents of the docs folder in the cache
      checksum, so any changes in that directory will bust the result cache.
      ca36bb90
  12. 2月 07, 2024
  13. 2月 02, 2024
  14. 1月 31, 2024
  15. 1月 27, 2024
  16. 1月 25, 2024
  17. 1月 24, 2024
  18. 1月 20, 2024
  19. 1月 13, 2024
  20. 1月 05, 2024
  21. 1月 04, 2024
  22. 1月 03, 2024
  23. 12月 21, 2023
  24. 12月 09, 2023
  25. 12月 07, 2023
  26. 12月 06, 2023
  27. 12月 04, 2023
  28. 12月 02, 2023
  29. 12月 01, 2023
  30. 11月 24, 2023
  31. 11月 15, 2023
  32. 11月 10, 2023
  33. 11月 03, 2023
  34. 11月 02, 2023
  35. 10月 31, 2023
加载中