From dc69141877833b10d14c5fe02bceb39914a4a84d Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 13 Jul 2020 11:30:06 +0200 Subject: [PATCH] Follow up - 0da00041a580df4fd1d299ec7048db7c6aedd100 - Maintenance: Limited rubocop TODOs to explicit files to ensure checks for new files. --- .rubocop_todo.rspec.yml | 661 ++++++++++++++++++++++++++++++++++++---- .rubocop_todo.yml | 72 +++++ 2 files changed, 678 insertions(+), 55 deletions(-) diff --git a/.rubocop_todo.rspec.yml b/.rubocop_todo.rspec.yml index 4e2087e32..63915f117 100644 --- a/.rubocop_todo.rspec.yml +++ b/.rubocop_todo.rspec.yml @@ -1,24 +1,3 @@ -# This configuration was generated by -# `rubocop --auto-gen-config` -# on 2019-04-12 17:16:30 +0800 using RuboCop version 0.67.2. -# The point is for the user to remove these configuration records -# one by one as the offenses are removed from the code base. -# Note that changes in the inspected code, or installation of new -# versions of RuboCop, may require this file to be generated again. - -# # Offense count: 17 (Competes with same override in .rubocop_todo.yml) -# Metrics/AbcSize: -# Max: 24 - -# Offense count: 664 -# Configuration parameters: CountComments, ExcludedMethods. -# ExcludedMethods: refine -Metrics/BlockLength: - Max: 1653 - Exclude: - - 'spec/requests/ticket_spec.rb' - -# Offense count: 16 RSpec/AnyInstance: Exclude: - 'spec/lib/import/otrs/article_spec.rb' @@ -31,7 +10,6 @@ RSpec/AnyInstance: - 'spec/lib/import/otrs/user_spec.rb' - 'spec/models/import_job_spec.rb' -# Offense count: 3 RSpec/BeforeAfterAll: Exclude: - 'spec/spec_helper.rb' @@ -41,18 +19,286 @@ RSpec/BeforeAfterAll: - 'spec/lib/sequencer/unit/import/zendesk/ticket/comment/source_based_spec.rb' - 'spec/models/translation_spec.rb' -# Offense count: 523 -# Configuration parameters: Prefixes. -# Prefixes: when, with, without RSpec/ContextWording: - Enabled: false + Exclude: + - 'spec/db/migrate/active_job_lock_cleanup_job_scheduler_spec.rb' + - 'spec/db/migrate/check_for_object_attributes_spec.rb' + - 'spec/db/migrate/forget_insecure_sessions_spec.rb' + - 'spec/db/migrate/issue_1219_zhtw_locale_typo_spec.rb' + - 'spec/db/migrate/issue_1905_exchange_login_from_remote_id_spec.rb' + - 'spec/db/migrate/issue_1977_remove_invalid_user_foreign_keys_spec.rb' + - 'spec/db/migrate/issue_2333_object_country_already_exists_spec.rb' + - 'spec/db/migrate/issue_2345_es_attachment_max_size_in_mb_setting_lower_default_spec.rb' + - 'spec/db/migrate/issue_2368_add_indices_to_histories_and_tickets_spec.rb' + - 'spec/db/migrate/issue_2541_fix_notification_email_without_body_spec.rb' + - 'spec/jobs/concerns/has_active_job_lock_spec.rb' + - 'spec/jobs/concerns/has_collection_update_spec.rb' + - 'spec/jobs/concerns/has_ticket_create_screen_impact_spec.rb' + - 'spec/jobs/imap_authentication_migration_cleanup_job_spec.rb' + - 'spec/jobs/ticket_article_communicate_email_job_spec.rb' + - 'spec/lib/application_handle_info_spec.rb' + - 'spec/lib/auth/developer_spec.rb' + - 'spec/lib/auth/ldap_spec.rb' + - 'spec/lib/auth_spec.rb' + - 'spec/lib/core_ext/string_spec.rb' + - 'spec/lib/external_credential/google_spec.rb' + - 'spec/lib/html_sanitizer_spec.rb' + - 'spec/lib/import/exchange/folder_spec.rb' + - 'spec/lib/import/helper_spec.rb' + - 'spec/lib/import/ldap_spec.rb' + - 'spec/lib/import/otrs/article_spec.rb' + - 'spec/lib/import/otrs/customer_spec.rb' + - 'spec/lib/import/otrs/customer_user_spec.rb' + - 'spec/lib/import/otrs/priority_spec.rb' + - 'spec/lib/import/otrs/queue_spec.rb' + - 'spec/lib/import/otrs/requester_spec.rb' + - 'spec/lib/import/otrs/state_factory_spec.rb' + - 'spec/lib/import/otrs/state_spec.rb' + - 'spec/lib/import/otrs/ticket_spec.rb' + - 'spec/lib/import/otrs/user_spec.rb' + - 'spec/lib/ldap/group_spec.rb' + - 'spec/lib/ldap/user_spec.rb' + - 'spec/lib/ldap_spec.rb' + - 'spec/lib/notification_factory/mailer_spec.rb' + - 'spec/lib/notification_factory/slack_spec.rb' + - 'spec/lib/notification_factory/template_spec.rb' + - 'spec/lib/notification_factory_spec.rb' + - 'spec/lib/password_hash_spec.rb' + - 'spec/lib/search_index_backend_spec.rb' + - 'spec/lib/secure_mailing/smime_spec.rb' + - 'spec/lib/sequencer/sequence/import/ldap/users_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/associations/assign_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/save_spec.rb' + - 'spec/lib/sequencer/unit/import/common/object_attribute/sanitized_name_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/user/attributes/role_ids/unassigned_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/sub_sequence/base_examples.rb' + - 'spec/lib/sequencer/unit/import/zendesk/ticket/comment/source_based_spec.rb' + - 'spec/lib/sessions/backend/base_spec.rb' + - 'spec/lib/sessions/backend/ticket_overview_list_spec.rb' + - 'spec/lib/signature_detection_spec.rb' + - 'spec/lib/stats/ticket_waiting_time_spec.rb' + - 'spec/lib/zammad/application/initializer/session_store_spec.rb' + - 'spec/models/application_model/can_assets_examples.rb' + - 'spec/models/application_model/can_latest_change_examples.rb' + - 'spec/models/application_model/can_lookup_examples.rb' + - 'spec/models/application_model/checks_import_examples.rb' + - 'spec/models/calendar_spec.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/channel/filter/follow_up_merged_spec.rb' + - 'spec/models/channel/filter/follow_up_possible_check_spec.rb' + - 'spec/models/channel/filter/match/email_regex_spec.rb' + - 'spec/models/channel/filter/out_of_office_check_spec.rb' + - 'spec/models/concerns/can_csv_import_examples.rb' + - 'spec/models/concerns/checks_kb_client_notification_examples.rb' + - 'spec/models/concerns/has_collection_update_examples.rb' + - 'spec/models/concerns/has_group_relation_definition_examples.rb' + - 'spec/models/concerns/has_groups_examples.rb' + - 'spec/models/concerns/has_groups_permissions_examples.rb' + - 'spec/models/concerns/has_history_examples.rb' + - 'spec/models/concerns/has_roles_examples.rb' + - 'spec/models/concerns/has_search_index_backend_examples.rb' + - 'spec/models/concerns/has_ticket_create_screen_impact_examples.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/driver/base_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/email_address_spec.rb' + - 'spec/models/history_spec.rb' + - 'spec/models/job_spec.rb' + - 'spec/models/knowledge_base/answer/translation/search_with_attachment_spec.rb' + - 'spec/models/knowledge_base/category_spec.rb' + - 'spec/models/knowledge_base/menu_item_spec.rb' + - 'spec/models/knowledge_base_spec.rb' + - 'spec/models/object_lookup_spec.rb' + - 'spec/models/object_manager/attribute/validation/future_past_spec.rb' + - 'spec/models/object_manager/attribute/validation/min_max_spec.rb' + - 'spec/models/object_manager/attribute/validation/required_spec.rb' + - 'spec/models/object_manager/attribute/validation_spec.rb' + - 'spec/models/object_manager/attribute_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter_spec.rb' + - 'spec/models/overview_spec.rb' + - 'spec/models/role_spec.rb' + - 'spec/models/scheduler_spec.rb' + - 'spec/models/smime_certificate_spec.rb' + - 'spec/models/tag/item_spec.rb' + - 'spec/models/tag_spec.rb' + - 'spec/models/taskbar_spec.rb' + - 'spec/models/ticket/article_spec.rb' + - 'spec/models/ticket/number/date_spec.rb' + - 'spec/models/ticket/number/increment_spec.rb' + - 'spec/models/ticket/state_spec.rb' + - 'spec/models/ticket_spec.rb' + - 'spec/models/token_spec.rb' + - 'spec/models/translation_spec.rb' + - 'spec/models/trigger/sms_spec.rb' + - 'spec/models/trigger_spec.rb' + - 'spec/models/type_lookup_spec.rb' + - 'spec/models/user/has_ticket_create_screen_impact_examples.rb' + - 'spec/models/user_device_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/policies/ticket_policy_spec.rb' + - 'spec/policies/user_policy_spec.rb' + - 'spec/requests/cors_preflight_check_spec.rb' + - 'spec/requests/error_spec.rb' + - 'spec/requests/external_credentials_spec.rb' + - 'spec/requests/integration/check_mk_spec.rb' + - 'spec/requests/integration/gmail_spec.rb' + - 'spec/requests/integration/object_manager_attributes_spec.rb' + - 'spec/requests/integration/smime_spec.rb' + - 'spec/requests/knowledge_base/attachments_spec.rb' + - 'spec/requests/knowledge_base/search_with_details_spec.rb' + - 'spec/requests/session_spec.rb' + - 'spec/requests/tag_spec.rb' + - 'spec/requests/ticket/article_spec.rb' + - 'spec/requests/ticket_spec.rb' + - 'spec/requests/time_accounting_spec.rb' + - 'spec/requests/upload_cache_spec.rb' + - 'spec/requests/user/permission_spec.rb' + - 'spec/requests/user_spec.rb' + - 'spec/system/**/*' -# Offense count: 540 -# Configuration parameters: Max. RSpec/ExampleLength: - Enabled: false + Exclude: + - 'spec/db/migrate/20171023000001_fixed_store_upgrade_ror_45_spec.rb' + - 'spec/db/migrate/check_for_object_attributes_spec.rb' + - 'spec/db/migrate/issue_1660_fix_tree_select_configurations_spec.rb' + - 'spec/db/migrate/issue_1905_exchange_login_from_remote_id_spec.rb' + - 'spec/db/migrate/issue_1977_remove_invalid_user_foreign_keys_spec.rb' + - 'spec/db/migrate/issue_2867_footer_header_public_link_spec.rb' + - 'spec/db/migrate/object_manager_attribute_date_remove_future_past_spec.rb' + - 'spec/db/migrate/rename_locale_on_users_spec.rb' + - 'spec/jobs/concerns/has_active_job_lock_spec.rb' + - 'spec/jobs/ticket_user_ticket_counter_job_spec.rb' + - 'spec/jobs/user_device_log_job_spec.rb' + - 'spec/lib/auth/internal_spec.rb' + - 'spec/lib/auth/ldap_spec.rb' + - 'spec/lib/auto_wizard_spec.rb' + - 'spec/lib/core_ext/string_spec.rb' + - 'spec/lib/external_credential/google_spec.rb' + - 'spec/lib/external_sync_spec.rb' + - 'spec/lib/import/import_job_backend_examples.rb' + - 'spec/lib/import/ldap_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/checkbox_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/date_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/date_time_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/dropdown_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/multiselect_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/text_area_spec.rb' + - 'spec/lib/import/otrs/dynamic_field/text_spec.rb' + - 'spec/lib/import/otrs/history/article_spec.rb' + - 'spec/lib/import/otrs/history/move_spec.rb' + - 'spec/lib/import/otrs/history/new_ticket_spec.rb' + - 'spec/lib/import/otrs/history/priority_update_spec.rb' + - 'spec/lib/import/otrs/history/state_update_spec.rb' + - 'spec/lib/import/otrs/priority_factory_spec.rb' + - 'spec/lib/import/otrs/state_factory_spec.rb' + - 'spec/lib/import/otrs/sys_config_factory_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/checkbox_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/date_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/decimal_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/dropdown_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/integer_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/regexp_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/tagger_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/text_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/textarea_spec.rb' + - 'spec/lib/ldap/group_spec.rb' + - 'spec/lib/ldap/user_spec.rb' + - 'spec/lib/ldap_spec.rb' + - 'spec/lib/migration_job/ldap_samaccountname_to_uid_spec.rb' + - 'spec/lib/notification_factory/mailer_spec.rb' + - 'spec/lib/notification_factory/renderer_spec.rb' + - 'spec/lib/notification_factory/slack_spec.rb' + - 'spec/lib/report/ticket_generic_time_spec.rb' + - 'spec/lib/search_index_backend_spec.rb' + - 'spec/lib/secure_mailing/smime_spec.rb' + - 'spec/lib/sequencer/sequence/import/ldap/users_spec.rb' + - 'spec/lib/sequencer/unit/common/attribute_mapper_spec.rb' + - 'spec/lib/sequencer/unit/import/common/mapping/flat_keys_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/attributes/remote_id_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/lookup/external_sync_spec.rb' + - 'spec/lib/sequencer/unit/import/common/remote_id/case_sensitive_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/user/attributes/role_ids/signup_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/user/lookup/attributes_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/user/mapping_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/sub_sequence/base_examples.rb' + - 'spec/lib/sessions/backend/ticket_overview_list_spec.rb' + - 'spec/lib/sessions/event/chat_session_start_spec.rb' + - 'spec/lib/sessions/event/chat_transfer_spec.rb' + - 'spec/lib/signature_detection_spec.rb' + - 'spec/lib/upload_cache_spec.rb' + - 'spec/lib/user_info_spec.rb' + - 'spec/models/application_model/can_lookup_examples.rb' + - 'spec/models/calendar_spec.rb' + - 'spec/models/channel/driver/imap_spec.rb' + - 'spec/models/channel/driver/sms/twilio_spec.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/channel/filter/follow_up_merged_spec.rb' + - 'spec/models/concerns/has_collection_update_examples.rb' + - 'spec/models/concerns/has_group_relation_definition_examples.rb' + - 'spec/models/concerns/has_groups_examples.rb' + - 'spec/models/concerns/has_roles_examples.rb' + - 'spec/models/concerns/has_tags_examples.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/history_spec.rb' + - 'spec/models/import_job_spec.rb' + - 'spec/models/object_manager/attribute_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/overview_spec.rb' + - 'spec/models/recent_view_spec.rb' + - 'spec/models/role_group_spec.rb' + - 'spec/models/role_spec.rb' + - 'spec/models/scheduler_spec.rb' + - 'spec/models/taskbar_spec.rb' + - 'spec/models/ticket/article_spec.rb' + - 'spec/models/ticket/overviews_spec.rb' + - 'spec/models/ticket_spec.rb' + - 'spec/models/translation_spec.rb' + - 'spec/models/trigger_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/requests/admin/knowledge_base/public_menu_spec.rb' + - 'spec/requests/api_auth_on_behalf_of_spec.rb' + - 'spec/requests/api_auth_spec.rb' + - 'spec/requests/calendar_spec.rb' + - 'spec/requests/external_credentials_spec.rb' + - 'spec/requests/form_spec.rb' + - 'spec/requests/integration/check_mk_spec.rb' + - 'spec/requests/integration/cti_spec.rb' + - 'spec/requests/integration/idoit_spec.rb' + - 'spec/requests/integration/monitoring_spec.rb' + - 'spec/requests/integration/object_manager_attributes_spec.rb' + - 'spec/requests/integration/placetel_spec.rb' + - 'spec/requests/integration/sipgate_spec.rb' + - 'spec/requests/integration/smime_spec.rb' + - 'spec/requests/integration/telegram_spec.rb' + - 'spec/requests/integration/twilio_sms_spec.rb' + - 'spec/requests/integration/user_device_spec.rb' + - 'spec/requests/knowledge_base/answer_attachments_cloning_spec.rb' + - 'spec/requests/long_polling_spec.rb' + - 'spec/requests/o_auth_spec.rb' + - 'spec/requests/organization_spec.rb' + - 'spec/requests/overview_spec.rb' + - 'spec/requests/package_spec.rb' + - 'spec/requests/report_spec.rb' + - 'spec/requests/search_spec.rb' + - 'spec/requests/settings_spec.rb' + - 'spec/requests/sla_spec.rb' + - 'spec/requests/taskbar_spec.rb' + - 'spec/requests/text_module_spec.rb' + - 'spec/requests/ticket/article_attachments_spec.rb' + - 'spec/requests/ticket/article_spec.rb' + - 'spec/requests/ticket/escalation_spec.rb' + - 'spec/requests/ticket_spec.rb' + - 'spec/requests/time_accounting_spec.rb' + - 'spec/requests/user/organization_spec.rb' + - 'spec/requests/user/permission_spec.rb' + - 'spec/requests/user_spec.rb' + - 'spec/scripts/websocket_server_spec.rb' + - 'spec/system/**/*' -# Offense count: 36 RSpec/ExpectActual: Exclude: - 'spec/routing/**/*' @@ -65,15 +311,12 @@ RSpec/ExpectActual: - 'spec/requests/user/organization_spec.rb' - 'spec/requests/user_spec.rb' -# Offense count: 3 RSpec/ExpectInHook: Exclude: - 'spec/models/calendar_spec.rb' - 'spec/models/concerns/has_search_index_backend_examples.rb' - 'spec/models/ticket/article_spec.rb' -# Offense count: 12 -# Configuration parameters: CustomTransform, IgnoreMethods. RSpec/FilePath: Exclude: - 'spec/db/migrate/20171023000001_fixed_store_upgrade_ror_45_spec.rb' @@ -94,8 +337,6 @@ RSpec/FilePath: - 'spec/db/migrate/issue_2867_footer_header_public_link_spec.rb' - 'spec/lib/import/base_factory_spec.rb' -# Offense count: 60 -# Configuration parameters: AssignmentOnly. RSpec/InstanceVariable: Exclude: - 'spec/lib/notification_factory/renderer_spec.rb' @@ -110,23 +351,242 @@ RSpec/InstanceVariable: - 'spec/requests/ticket/article_attachments_spec.rb' - 'spec/requests/user_spec.rb' -# Offense count: 34 RSpec/LetSetup: - Enabled: false + Exclude: + - 'spec/jobs/ticket_online_notification_seen_job_spec.rb' + - 'spec/lib/external_credential/google_spec.rb' + - 'spec/lib/secure_mailing/smime_spec.rb' + - 'spec/lib/sessions/backend/ticket_overview_list_spec.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/driver/base_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/organization_spec.rb' + - 'spec/models/role_group_spec.rb' + - 'spec/models/tag_spec.rb' + - 'spec/models/ticket/article_spec.rb' + - 'spec/models/trigger_spec.rb' + - 'spec/models/user_group_spec.rb' + - 'spec/requests/external_credentials_spec.rb' + - 'spec/requests/integration/cti_spec.rb' + - 'spec/requests/integration/idoit_spec.rb' + - 'spec/requests/integration/monitoring_spec.rb' + - 'spec/requests/integration/placetel_spec.rb' + - 'spec/requests/integration/sipgate_spec.rb' + - 'spec/requests/search_spec.rb' + - 'spec/requests/ticket/escalation_spec.rb' + - 'spec/requests/time_accounting_spec.rb' + - 'spec/requests/user/organization_spec.rb' + - 'spec/requests/user_spec.rb' -# Offense count: 242 -# Configuration parameters: EnforcedStyle. -# SupportedStyles: have_received, receive RSpec/MessageSpies: - Enabled: false + Exclude: + - 'spec/db/migrate/check_for_object_attributes_spec.rb' + - 'spec/db/migrate/issue_1660_fix_tree_select_configurations_spec.rb' + - 'spec/db/migrate/issue_1905_exchange_login_from_remote_id_spec.rb' + - 'spec/db/migrate/object_manager_attribute_date_remove_future_past_spec.rb' + - 'spec/jobs/app_version_restart_job_spec.rb' + - 'spec/jobs/search_index_job_spec.rb' + - 'spec/jobs/sla_ticket_rebuild_escalation_job_spec.rb' + - 'spec/lib/auth/developer_spec.rb' + - 'spec/lib/auth/ldap_spec.rb' + - 'spec/lib/import/base_factory_examples.rb' + - 'spec/lib/import/helper_spec.rb' + - 'spec/lib/import/otrs/article/attachment_factory_spec.rb' + - 'spec/lib/import/otrs/article_customer_spec.rb' + - 'spec/lib/import/otrs/article_spec.rb' + - 'spec/lib/import/otrs/customer_spec.rb' + - 'spec/lib/import/otrs/customer_user_spec.rb' + - 'spec/lib/import/otrs/dynamic_field_examples.rb' + - 'spec/lib/import/otrs/dynamic_field_factory_spec.rb' + - 'spec/lib/import/otrs/dynamic_field_spec.rb' + - 'spec/lib/import/otrs/history_examples.rb' + - 'spec/lib/import/otrs/priority_factory_spec.rb' + - 'spec/lib/import/otrs/priority_spec.rb' + - 'spec/lib/import/otrs/queue_spec.rb' + - 'spec/lib/import/otrs/requester_spec.rb' + - 'spec/lib/import/otrs/state_factory_spec.rb' + - 'spec/lib/import/otrs/state_spec.rb' + - 'spec/lib/import/otrs/ticket_spec.rb' + - 'spec/lib/import/otrs/user_factory_spec.rb' + - 'spec/lib/import/otrs/user_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/base_examples.rb' + - 'spec/lib/import/zendesk/object_attribute/checkbox_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/date_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/decimal_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/dropdown_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/integer_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/regexp_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/tagger_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/text_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/textarea_spec.rb' + - 'spec/lib/ldap/group_spec.rb' + - 'spec/lib/ldap/guid_spec.rb' + - 'spec/lib/ldap/user_spec.rb' + - 'spec/lib/ldap_spec.rb' + - 'spec/lib/migration_job/ldap_samaccountname_to_uid_spec.rb' + - 'spec/lib/sequencer/sequence/import/ldap/users_spec.rb' + - 'spec/lib/sequencer/unit/common/attribute_mapper_spec.rb' + - 'spec/lib/sequencer/unit/import/common/mapping/flat_keys_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/attributes/remote_id_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/reset_primary_key_sequence_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/save_spec.rb' + - 'spec/lib/sequencer/unit/import/common/object_attribute/sanitized_name_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/sub_sequence/base_examples.rb' + - 'spec/lib/sequencer/unit/import/zendesk/ticket/comment/attachment/request_spec.rb' + - 'spec/models/application_model/can_lookup_examples.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/concerns/has_groups_examples.rb' + - 'spec/models/concerns/has_history_examples.rb' + - 'spec/models/concerns/has_roles_examples.rb' + - 'spec/models/concerns/has_tags_examples.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/import_job_spec.rb' + - 'spec/models/object_manager/attribute/validation/backend_spec.rb' + - 'spec/models/object_manager/attribute/validation_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter_spec.rb' + - 'spec/models/scheduler_spec.rb' + - 'spec/models/ticket/number_spec.rb' + - 'spec/models/ticket_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/system/system/translations_spec.rb' -# Offense count: 478 -# Configuration parameters: AggregateFailuresByDefault. RSpec/MultipleExpectations: - Max: 266 + Exclude: + - 'spec/db/migrate/20171023000001_fixed_store_upgrade_ror_45_spec.rb' + - 'spec/db/migrate/check_for_object_attributes_spec.rb' + - 'spec/db/migrate/issue_1660_fix_tree_select_configurations_spec.rb' + - 'spec/db/migrate/issue_1905_exchange_login_from_remote_id_spec.rb' + - 'spec/db/migrate/object_manager_attribute_date_remove_future_past_spec.rb' + - 'spec/db/migrate/rename_locale_on_users_spec.rb' + - 'spec/jobs/concerns/has_active_job_lock_spec.rb' + - 'spec/jobs/search_index_job_spec.rb' + - 'spec/jobs/ticket_user_ticket_counter_job_spec.rb' + - 'spec/lib/auth/developer_spec.rb' + - 'spec/lib/auth/internal_spec.rb' + - 'spec/lib/auth/ldap_spec.rb' + - 'spec/lib/auth_spec.rb' + - 'spec/lib/cache_spec.rb' + - 'spec/lib/core_ext/string_spec.rb' + - 'spec/lib/email_address_validation_spec.rb' + - 'spec/lib/external_sync_spec.rb' + - 'spec/lib/html_sanitizer_spec.rb' + - 'spec/lib/import/base_factory_examples.rb' + - 'spec/lib/import/helper_spec.rb' + - 'spec/lib/import/import_job_backend_examples.rb' + - 'spec/lib/import/ldap_spec.rb' + - 'spec/lib/import/otrs/article_customer_spec.rb' + - 'spec/lib/import/otrs/customer_spec.rb' + - 'spec/lib/import/otrs/dynamic_field_spec.rb' + - 'spec/lib/import/otrs/history_examples.rb' + - 'spec/lib/import/otrs/priority_factory_spec.rb' + - 'spec/lib/import/otrs/requester_spec.rb' + - 'spec/lib/import/otrs/state_factory_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/base_examples.rb' + - 'spec/lib/import/zendesk/object_attribute/checkbox_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/date_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/decimal_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/dropdown_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/integer_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/regexp_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/tagger_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/text_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/textarea_spec.rb' + - 'spec/lib/ldap/group_spec.rb' + - 'spec/lib/ldap/guid_spec.rb' + - 'spec/lib/ldap/user_spec.rb' + - 'spec/lib/ldap_spec.rb' + - 'spec/lib/migration_job/ldap_samaccountname_to_uid_spec.rb' + - 'spec/lib/notification_factory/mailer_spec.rb' + - 'spec/lib/password_hash_spec.rb' + - 'spec/lib/secure_mailing/smime_spec.rb' + - 'spec/lib/sequencer/sequence/import/ldap/users_spec.rb' + - 'spec/lib/sequencer/unit/common/attribute_mapper_spec.rb' + - 'spec/lib/sequencer/unit/import/common/mapping/flat_keys_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/associations/assign_spec.rb' + - 'spec/lib/sequencer/unit/import/common/model/attributes/remote_id_spec.rb' + - 'spec/lib/sequencer/unit/import/common/object_attribute/sanitized_name_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/user/attributes/role_ids/unassigned_spec.rb' + - 'spec/lib/sequencer/unit/import/ldap/users/lost/deactivate_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/sub_sequence/base_examples.rb' + - 'spec/lib/sessions/event/chat_session_start_spec.rb' + - 'spec/lib/sessions/event/chat_transfer_spec.rb' + - 'spec/lib/upload_cache_spec.rb' + - 'spec/lib/user_info_spec.rb' + - 'spec/models/application_model/can_lookup_examples.rb' + - 'spec/models/calendar_spec.rb' + - 'spec/models/channel/driver/sms/twilio_spec.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/concerns/has_groups_examples.rb' + - 'spec/models/concerns/has_history_examples.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/history_spec.rb' + - 'spec/models/import_job_spec.rb' + - 'spec/models/job_spec.rb' + - 'spec/models/object_lookup_spec.rb' + - 'spec/models/object_manager/attribute/validation/backend_spec.rb' + - 'spec/models/object_manager/attribute/validation_spec.rb' + - 'spec/models/object_manager/attribute_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/overview_spec.rb' + - 'spec/models/scheduler_spec.rb' + - 'spec/models/smime_certificate_spec.rb' + - 'spec/models/taskbar_spec.rb' + - 'spec/models/ticket/article_spec.rb' + - 'spec/models/ticket/number/increment_spec.rb' + - 'spec/models/ticket/number_spec.rb' + - 'spec/models/ticket/overviews_spec.rb' + - 'spec/models/ticket_spec.rb' + - 'spec/models/translation_spec.rb' + - 'spec/models/trigger_spec.rb' + - 'spec/models/type_lookup_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/requests/api_auth_on_behalf_of_spec.rb' + - 'spec/requests/api_auth_spec.rb' + - 'spec/requests/calendar_spec.rb' + - 'spec/requests/error_spec.rb' + - 'spec/requests/external_credentials_spec.rb' + - 'spec/requests/form_spec.rb' + - 'spec/requests/integration/check_mk_spec.rb' + - 'spec/requests/integration/cti_spec.rb' + - 'spec/requests/integration/idoit_spec.rb' + - 'spec/requests/integration/monitoring_spec.rb' + - 'spec/requests/integration/object_manager_attributes_spec.rb' + - 'spec/requests/integration/placetel_spec.rb' + - 'spec/requests/integration/sipgate_spec.rb' + - 'spec/requests/integration/smime_spec.rb' + - 'spec/requests/integration/telegram_spec.rb' + - 'spec/requests/integration/twilio_sms_spec.rb' + - 'spec/requests/integration/user_device_spec.rb' + - 'spec/requests/long_polling_spec.rb' + - 'spec/requests/o_auth_spec.rb' + - 'spec/requests/organization_spec.rb' + - 'spec/requests/overview_spec.rb' + - 'spec/requests/package_spec.rb' + - 'spec/requests/report_spec.rb' + - 'spec/requests/search_spec.rb' + - 'spec/requests/session_spec.rb' + - 'spec/requests/settings_spec.rb' + - 'spec/requests/sla_spec.rb' + - 'spec/requests/tag_spec.rb' + - 'spec/requests/taskbar_spec.rb' + - 'spec/requests/text_module_spec.rb' + - 'spec/requests/ticket/article_attachments_spec.rb' + - 'spec/requests/ticket/article_spec.rb' + - 'spec/requests/ticket/escalation_spec.rb' + - 'spec/requests/ticket_spec.rb' + - 'spec/requests/time_accounting_spec.rb' + - 'spec/requests/user/organization_spec.rb' + - 'spec/requests/user/permission_spec.rb' + - 'spec/requests/user_spec.rb' + - 'spec/system/**/*' -# Offense count: 83 -# Configuration parameters: IgnoreSharedExamples. RSpec/NamedSubject: Exclude: - 'spec/db/migrate/issue_2019_fix_double_domain_links_in_trigger_emails_spec.rb' @@ -145,32 +605,105 @@ RSpec/NamedSubject: - 'spec/models/object_manager/attribute/validation_spec.rb' - 'spec/models/object_manager/attribute_spec.rb' -# Offense count: 545 RSpec/NestedGroups: - Max: 8 + Exclude: + - 'spec/db/migrate/issue_2541_fix_notification_email_without_body_spec.rb' + - 'spec/jobs/concerns/has_collection_update_spec.rb' + - 'spec/jobs/concerns/has_ticket_create_screen_impact_spec.rb' + - 'spec/lib/application_handle_info_spec.rb' + - 'spec/lib/core_ext/string_spec.rb' + - 'spec/lib/email_address_validation_spec.rb' + - 'spec/lib/external_credential/google_spec.rb' + - 'spec/lib/html_sanitizer_spec.rb' + - 'spec/lib/import/exchange/folder_spec.rb' + - 'spec/lib/notification_factory/mailer_spec.rb' + - 'spec/lib/notification_factory/template_spec.rb' + - 'spec/lib/notification_factory_spec.rb' + - 'spec/lib/search_index_backend_spec.rb' + - 'spec/lib/secure_mailing/smime_spec.rb' + - 'spec/lib/sessions/backend/base_spec.rb' + - 'spec/lib/sessions/backend/ticket_overview_list_spec.rb' + - 'spec/lib/signature_detection_spec.rb' + - 'spec/lib/stats/ticket_waiting_time_spec.rb' + - 'spec/lib/twitter_sync_spec.rb' + - 'spec/models/calendar_spec.rb' + - 'spec/models/channel/driver/twitter_spec.rb' + - 'spec/models/channel/email_parser_spec.rb' + - 'spec/models/channel/filter/match/email_regex_spec.rb' + - 'spec/models/channel/filter/out_of_office_check_spec.rb' + - 'spec/models/concerns/has_collection_update_examples.rb' + - 'spec/models/concerns/has_ticket_create_screen_impact_examples.rb' + - 'spec/models/cti/caller_id_spec.rb' + - 'spec/models/cti/log_spec.rb' + - 'spec/models/email_address_spec.rb' + - 'spec/models/history_spec.rb' + - 'spec/models/job_spec.rb' + - 'spec/models/knowledge_base_spec.rb' + - 'spec/models/locale_spec.rb' + - 'spec/models/object_lookup_spec.rb' + - 'spec/models/object_manager/attribute/validation/min_max_spec.rb' + - 'spec/models/object_manager/attribute/validation/required_spec.rb' + - 'spec/models/object_manager/attribute/validation_spec.rb' + - 'spec/models/object_manager/attribute_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/organization_spec.rb' + - 'spec/models/recent_view_spec.rb' + - 'spec/models/role_spec.rb' + - 'spec/models/scheduler_spec.rb' + - 'spec/models/smime_certificate_spec.rb' + - 'spec/models/tag/item_spec.rb' + - 'spec/models/tag_spec.rb' + - 'spec/models/taskbar_spec.rb' + - 'spec/models/ticket/article_spec.rb' + - 'spec/models/ticket/number/date_spec.rb' + - 'spec/models/ticket/number/increment_spec.rb' + - 'spec/models/ticket/state_spec.rb' + - 'spec/models/ticket/time_accounting_spec.rb' + - 'spec/models/ticket_spec.rb' + - 'spec/models/token_spec.rb' + - 'spec/models/trigger_spec.rb' + - 'spec/models/type_lookup_spec.rb' + - 'spec/models/user/has_ticket_create_screen_impact_examples.rb' + - 'spec/models/user_device_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/policies/ticket_policy_spec.rb' + - 'spec/policies/user_policy_spec.rb' + - 'spec/requests/channels_twitter_spec.rb' + - 'spec/requests/error_spec.rb' + - 'spec/requests/external_credentials_spec.rb' + - 'spec/requests/integration/object_manager_attributes_spec.rb' + - 'spec/requests/integration/smime_spec.rb' + - 'spec/requests/integration/telegram_spec.rb' + - 'spec/requests/knowledge_base/attachments_spec.rb' + - 'spec/requests/session_spec.rb' + - 'spec/requests/tag_spec.rb' + - 'spec/requests/ticket/article_spec.rb' + - 'spec/requests/ticket_spec.rb' + - 'spec/requests/time_accounting_spec.rb' + - 'spec/requests/user/permission_spec.rb' + - 'spec/requests/user_spec.rb' + - 'spec/system/manage/organizations_spec.rb' + - 'spec/system/ticket/create_spec.rb' + - 'spec/system/ticket/zoom_spec.rb' -# Offense count: 12 RSpec/RepeatedDescription: Exclude: - 'spec/models/translation_spec.rb' - 'spec/requests/form_spec.rb' - 'spec/requests/ticket_spec.rb' -# Offense count: 3 RSpec/ScatteredLet: Exclude: - 'spec/models/job_spec.rb' - 'spec/models/ticket_spec.rb' - 'spec/requests/integration/twitter_webhook_spec.rb' -# Offense count: 11 RSpec/ScatteredSetup: Exclude: - 'spec/models/ticket_spec.rb' - 'spec/models/user_spec.rb' - 'spec/requests/upload_cache_spec.rb' -# Offense count: 8 RSpec/SubjectStub: Exclude: - 'spec/lib/import/exchange/folder_spec.rb' @@ -180,7 +713,25 @@ RSpec/SubjectStub: - 'spec/models/object_manager/attribute/validation/future_past_spec.rb' - 'spec/models/object_manager/attribute/validation/required_spec.rb' -# Offense count: 25 -# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. RSpec/VerifiedDoubles: - Enabled: false + Exclude: + - 'spec/db/migrate/issue_2460_fix_corrupted_twitter_ids_spec.rb' + - 'spec/lib/auth/ldap_spec.rb' + - 'spec/lib/external_sync_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/base_examples.rb' + - 'spec/lib/import/zendesk/object_attribute/checkbox_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/date_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/decimal_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/dropdown_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/integer_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/regexp_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/tagger_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/text_spec.rb' + - 'spec/lib/import/zendesk/object_attribute/textarea_spec.rb' + - 'spec/lib/ldap_spec.rb' + - 'spec/lib/sequencer/sequence/import/ldap/users_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/sub_sequence/base_examples.rb' + - 'spec/lib/sequencer/unit/import/zendesk/ticket/comment/attachment/request_spec.rb' + - 'spec/lib/sequencer/unit/import/zendesk/ticket/comment/source_based_spec.rb' + - 'spec/models/observer/ticket/article/communicate_twitter/background_job_spec.rb' + - 'spec/models/ticket/number_spec.rb' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 041cc0440..d906375f6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -349,6 +349,78 @@ Metrics/AbcSize: - 'spec/**/*' - 'test/**/*' +Metrics/BlockLength: + Exclude: + - 'Gemfile' + - 'app/controllers/application_controller/authenticates.rb' + - 'app/controllers/reports_controller.rb' + - 'app/controllers/time_accountings_controller.rb' + - 'app/models/application_model/can_assets.rb' + - 'app/models/application_model/can_associations.rb' + - 'app/models/application_model/can_cleanup_param.rb' + - 'app/models/application_model/can_creates_and_updates.rb' + - 'app/models/application_model/can_lookup.rb' + - 'app/models/channel.rb' + - 'app/models/channel/driver/imap.rb' + - 'app/models/channel/driver/pop3.rb' + - 'app/models/channel/email_parser.rb' + - 'app/models/channel/filter/bounce_delivery_permanent_failed.rb' + - 'app/models/channel/filter/database.rb' + - 'app/models/channel/filter/identify_sender.rb' + - 'app/models/chat/session/search.rb' + - 'app/models/concerns/can_be_published.rb' + - 'app/models/concerns/can_clone_attachments.rb' + - 'app/models/concerns/can_csv_import.rb' + - 'app/models/concerns/has_groups.rb' + - 'app/models/concerns/has_history.rb' + - 'app/models/concerns/has_rich_text.rb' + - 'app/models/concerns/has_search_sortable.rb' + - 'app/models/job.rb' + - 'app/models/karma/activity_log.rb' + - 'app/models/knowledge_base/search.rb' + - 'app/models/object_manager/attribute.rb' + - 'app/models/observer/transaction.rb' + - 'app/models/organization/search.rb' + - 'app/models/package.rb' + - 'app/models/package/migration.rb' + - 'app/models/scheduler.rb' + - 'app/models/ticket.rb' + - 'app/models/ticket/overviews.rb' + - 'app/models/ticket/search.rb' + - 'app/models/ticket/search_index.rb' + - 'app/models/transaction/notification.rb' + - 'app/models/transaction/slack.rb' + - 'app/models/user/search.rb' + - 'config/environments/development.rb' + - 'config/initializers/omniauth.rb' + - 'config/routes/knowledge_base.rb' + - 'config/routes/test.rb' + - 'config/routes/ticket.rb' + - 'db/migrate/20120101000001_create_base.rb' + - 'db/migrate/20120101000010_create_ticket.rb' + - 'db/migrate/20180806000001_fixed_twitter_ticket_article_preferences7.rb' + - 'lib/can_be_published/state_machine.rb' + - 'lib/core_ext/string.rb' + - 'lib/email_helper.rb' + - 'lib/facebook.rb' + - 'lib/fill_db.rb' + - 'lib/html_sanitizer.rb' + - 'lib/notification_factory/renderer.rb' + - 'lib/report/ticket_first_solution.rb' + - 'lib/report/ticket_generic_time.rb' + - 'lib/report/ticket_moved.rb' + - 'lib/report/ticket_reopened.rb' + - 'lib/search_index_backend.rb' + - 'lib/sessions.rb' + - 'lib/sessions/backend/ticket_overview_list.rb' + - 'lib/sessions/client.rb' + - 'lib/tasks/search_index_es.rake' + - 'lib/tasks/zammad/ci/service/puma/start.rake' + - 'lib/twitter_sync.rb' + - 'script/websocket-server.rb' + - 'spec/**/*' + - 'test/**/*' + Metrics/BlockNesting: Exclude: - 'app/controllers/import_otrs_controller.rb'