Skip to content

Commit

Permalink
Maintenance: Move rubocop support files to the new .dev folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed May 13, 2024
1 parent 5873d1b commit 706fe83
Show file tree
Hide file tree
Showing 37 changed files with 14 additions and 15 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .rubocop/default.yml → .dev/rubocop/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -28,7 +28,7 @@ AllCops:
Include:
- '.gitlab/**/*.rb'
- '.github/**/*.rb'
- '.rubocop/**/*.rb'
- '.dev/rubocop/**/*.rb'
Exclude:
- 'bin/*'
- 'db/schema.rb'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion script/build/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/active_record_reorder_spec.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/enforce_in_modal_spec.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/faker_unique_spec.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/forbid_def_send_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/forbid_default_scope_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/zammad/trigger_from_commit_hooks_spec.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 706fe83

Please sign in to comment.