Maintenance: Move rubocop support files to the new .dev folder.
This commit is contained in:
@@ -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'
|
||||
@@ -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
|
||||
2
.github/workflows/ci/lint.sh
vendored
2
.github/workflows/ci/lint.sh
vendored
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user