Maintenance: Move rubocop support files to the new .dev folder.

This commit is contained in:
Martin Gruner
2024-05-13 14:55:55 +02:00
parent 5873d1b54c
commit 706fe83998
37 changed files with 14 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ require:
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
- ../config/initializers/inflections.rb
- ../../config/initializers/inflections.rb
- ./rubocop_zammad.rb
inherit_from:
@@ -28,7 +28,7 @@ AllCops:
Include:
- '.gitlab/**/*.rb'
- '.github/**/*.rb'
- '.rubocop/**/*.rb'
- '.dev/rubocop/**/*.rb'
Exclude:
- 'bin/*'
- 'db/schema.rb'

View File

@@ -17,7 +17,7 @@ Dir.glob("#{__dir__}/todo*.yml").each do |f|
section['Exclude'].each do |file|
next if file.include? '*'
obsolete_excludes.push(file) if !File.exist? "#{__dir__}/../#{file}"
obsolete_excludes.push(file) if !File.exist? "#{__dir__}/../../#{file}"
end
end
end

View File

@@ -18,7 +18,7 @@ echo "Rails zeitwerk:check autoloader check…"
bundle exec rails zeitwerk:check
.gitlab/check_graphql_api_consistency.sh
echo "Rubocop check…"
bundle exec .rubocop/validate_todos.rb
bundle exec .dev/rubocop/validate_todos.rb
bundle exec rubocop --parallel
echo "Coffeelint check…"
coffeelint --rules ./.coffeelint/rules/* app/

View File

@@ -58,7 +58,7 @@
when: on_failure
script:
- echo "Rubocop check…"
- bundle exec .rubocop/validate_todos.rb
- bundle exec .dev/rubocop/validate_todos.rb
- bundle exec rubocop --parallel
- echo "bundler-audit security check…"
- gem install bundler-audit

View File

@@ -2,4 +2,4 @@
# a) don't spam the root directory with rubocop files
# b) work around an issue with absolute excludes and custom development (https://github.com/rubocop-hq/rubocop/issues/4621)
inherit_from:
- .rubocop/default.yml
- .dev/rubocop/default.yml

View File

@@ -22,7 +22,6 @@ rm .gitlab-ci.yml
# linting
# Since the .eslint-plugin-zammad folder is a dependency in package.json (required by assets:precompile), it cannot be removed.
rm .rubocop.yml
rm -rf .rubocop
rm .stylelintrc.json .eslintignore .eslintrc .eslintrc.js .prettierrc.json
rm coffeelint.json
rm -rf .coffeelint

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/active_record_reorder'
require_relative '../../../../.dev/rubocop/cop/zammad/active_record_reorder'
RSpec.describe RuboCop::Cop::Zammad::ActiveRecordReorder, :aggregate_failures, type: :rubocop do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/enforce_in_modal'
require_relative '../../../../.dev/rubocop/cop/zammad/enforce_in_modal'
RSpec.describe RuboCop::Cop::Zammad::EnforceInModal, type: :rubocop do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/faker_unique'
require_relative '../../../../.dev/rubocop/cop/zammad/faker_unique'
RSpec.describe RuboCop::Cop::Zammad::FakerUnique, :aggregate_failures, type: :rubocop do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/forbid_def_send'
require_relative '../../../../.dev/rubocop/cop/zammad/forbid_def_send'
RSpec.describe RuboCop::Cop::Zammad::ForbidDefSend, type: :rubocop do
it 'accepts send() calls' do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/forbid_default_scope'
require_relative '../../../../.dev/rubocop/cop/zammad/forbid_default_scope'
RSpec.describe RuboCop::Cop::Zammad::ForbidDefaultScope, type: :rubocop do
it 'accepts simple order' do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/migration_scheduler_last_run'
require_relative '../../../../.dev/rubocop/cop/zammad/migration_scheduler_last_run'
RSpec.describe RuboCop::Cop::Zammad::MigrationSchedulerLastRun, type: :rubocop do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/to_forbid_over_not_to_permit'
require_relative '../../../../.dev/rubocop/cop/zammad/to_forbid_over_not_to_permit'
RSpec.describe RuboCop::Cop::Zammad::ToForbidOverNotToPermit, type: :rubocop do

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
require_relative '../../../../.rubocop/cop/zammad/trigger_from_commit_hooks'
require_relative '../../../../.dev/rubocop/cop/zammad/trigger_from_commit_hooks'
RSpec.describe RuboCop::Cop::Zammad::TriggerFromCommitHooks, :aggregate_failures, type: :rubocop do