Skip to content
Snippets Groups Projects
Commit f5f4c24d authored by Sahil Sarawagi's avatar Sahil Sarawagi
Browse files

Fix Layout/ArrayAlignment offenses

Changelog: other
parent 3a3c472d
No related branches found
No related tags found
1 merge request!163971Fix Layout/ArrayAlignment offenses
Showing
with 101 additions and 113 deletions
...@@ -38,18 +38,6 @@ Layout/ArrayAlignment: ...@@ -38,18 +38,6 @@ Layout/ArrayAlignment:
- 'ee/spec/frontend/fixtures/search.rb' - 'ee/spec/frontend/fixtures/search.rb'
- 'ee/spec/graphql/resolvers/analytics/contribution_analytics/contributions_resolver_spec.rb' - 'ee/spec/graphql/resolvers/analytics/contribution_analytics/contributions_resolver_spec.rb'
- 'ee/spec/graphql/types/dast_scanner_profile_type_spec.rb' - 'ee/spec/graphql/types/dast_scanner_profile_type_spec.rb'
- 'ee/spec/graphql/types/dast_site_profile_type_spec.rb'
- 'ee/spec/graphql/types/permission_types/epic_spec.rb'
- 'ee/spec/graphql/types/permission_types/vulnerability_spec.rb'
- 'ee/spec/graphql/types/pipeline_security_report_finding_type_spec.rb'
- 'ee/spec/graphql/types/requirements_management/requirement_type_spec.rb'
- 'ee/spec/graphql/types/vulnerability_type_spec.rb'
- 'ee/spec/helpers/boards_helper_spec.rb'
- 'ee/spec/lib/audit/group_merge_request_approval_setting_changes_auditor_spec.rb'
- 'ee/spec/lib/audit/project_changes_auditor_spec.rb'
- 'ee/spec/lib/ee/gitlab/auth/ldap/sync/group_spec.rb'
- 'ee/spec/lib/ee/gitlab/usage_data_spec.rb'
- 'ee/spec/lib/gitlab/auth/ldap/person_spec.rb'
- 'ee/spec/lib/gitlab/graphql/loaders/oncall_participant_loader_spec.rb' - 'ee/spec/lib/gitlab/graphql/loaders/oncall_participant_loader_spec.rb'
- 'ee/spec/lib/gitlab/search/index_curator_spec.rb' - 'ee/spec/lib/gitlab/search/index_curator_spec.rb'
- 'ee/spec/lib/gitlab/visibility_level_spec.rb' - 'ee/spec/lib/gitlab/visibility_level_spec.rb'
......
...@@ -157,14 +157,14 @@ ...@@ -157,14 +157,14 @@
let(:policy1) do let(:policy1) do
build(:scan_execution_policy, rules: [{ type: 'pipeline', branches: %w[master] }], actions: [ build(:scan_execution_policy, rules: [{ type: 'pipeline', branches: %w[master] }], actions: [
{ scan: 'dast', site_profile: 'Site Profile', scanner_profile: 'Scanner Profile' }, { scan: 'dast', site_profile: 'Site Profile', scanner_profile: 'Scanner Profile' },
{ scan: 'dast', site_profile: 'Site Profile 2', scanner_profile: 'Scanner Profile 2' } { scan: 'dast', site_profile: 'Site Profile 2', scanner_profile: 'Scanner Profile 2' }
]) ])
end end
let(:policy2) do let(:policy2) do
build(:scan_execution_policy, name: 'Run DAST in every pipeline 2', rules: [{ type: 'pipeline', branches: %w[master] }], actions: [ build(:scan_execution_policy, name: 'Run DAST in every pipeline 2', rules: [{ type: 'pipeline', branches: %w[master] }], actions: [
{ scan: 'dast', site_profile: 'Site Profile 3', scanner_profile: 'Scanner Profile 3' }, { scan: 'dast', site_profile: 'Site Profile 3', scanner_profile: 'Scanner Profile 3' },
{ scan: 'dast', site_profile: 'Site Profile 4', scanner_profile: 'Scanner Profile 4' } { scan: 'dast', site_profile: 'Site Profile 4', scanner_profile: 'Scanner Profile 4' }
]) ])
end end
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
RSpec.describe Types::PermissionTypes::Epic do RSpec.describe Types::PermissionTypes::Epic do
specify do specify do
expected_permissions = [:read_epic, :read_epic_iid, :update_epic, :destroy_epic, expected_permissions = [:read_epic, :read_epic_iid, :update_epic, :destroy_epic,
:admin_epic, :create_epic, :create_note, :award_emoji, :admin_epic_relation] :admin_epic, :create_epic, :create_note, :award_emoji, :admin_epic_relation]
expected_permissions.each do |permission| expected_permissions.each do |permission|
expect(described_class).to have_graphql_field(permission) expect(described_class).to have_graphql_field(permission)
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
RSpec.describe Types::PermissionTypes::Vulnerability do RSpec.describe Types::PermissionTypes::Vulnerability do
it do it do
expected_permissions = %i[read_vulnerability_feedback create_vulnerability_feedback destroy_vulnerability_feedback expected_permissions = %i[read_vulnerability_feedback create_vulnerability_feedback destroy_vulnerability_feedback
update_vulnerability_feedback create_vulnerability_export update_vulnerability_feedback create_vulnerability_export
admin_vulnerability_issue_link admin_vulnerability_external_issue_link admin_vulnerability_issue_link admin_vulnerability_external_issue_link
admin_vulnerability read_vulnerability] admin_vulnerability read_vulnerability]
expected_permissions.each do |permission| expected_permissions.each do |permission|
expect(described_class).to have_graphql_field(permission) expect(described_class).to have_graphql_field(permission)
......
...@@ -26,33 +26,33 @@ ...@@ -26,33 +26,33 @@
let(:fields) do let(:fields) do
%i[report_type %i[report_type
title title
severity severity
scanner scanner
identifiers identifiers
links links
assets assets
evidence evidence
project_fingerprint project_fingerprint
uuid uuid
project project
description description
location location
falsePositive falsePositive
solution solution
state state
details details
vulnerability vulnerability
issueLinks issueLinks
merge_request merge_request
remediations remediations
dismissed_at dismissed_at
dismissed_by dismissed_by
dismissal_reason dismissal_reason
state_comment state_comment
description_html description_html
solution_html solution_html
user_permissions] user_permissions]
end end
let(:sast_query) do let(:sast_query) do
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
RSpec.describe GitlabSchema.types['Requirement'] do RSpec.describe GitlabSchema.types['Requirement'] do
fields = %i[id iid work_item_iid title titleHtml description descriptionHtml state fields = %i[id iid work_item_iid title titleHtml description descriptionHtml state
last_test_report_state project author created_at updated_at last_test_report_state project author created_at updated_at
user_permissions test_reports last_test_report_manually_created] user_permissions test_reports last_test_report_manually_created]
it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Requirement) } it { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Requirement) }
......
...@@ -24,47 +24,47 @@ ...@@ -24,47 +24,47 @@
let_it_be(:fields) do let_it_be(:fields) do
%i[ %i[
userPermissions userPermissions
id id
uuid uuid
title title
description description
descriptionHtml descriptionHtml
solution solution
user_notes_count user_notes_count
state state
severity severity
report_type report_type
resolved_on_default_branch resolved_on_default_branch
vulnerability_path vulnerability_path
web_url web_url
location location
scanner scanner
primary_identifier primary_identifier
identifiers identifiers
project project
issueLinks issueLinks
detected_at detected_at
confirmed_at confirmed_at
resolved_at resolved_at
dismissed_at dismissed_at
updated_at updated_at
notes notes
external_issue_links external_issue_links
links links
has_remediations has_remediations
false_positive false_positive
state_comment state_comment
merge_request merge_request
discussions discussions
confirmed_by confirmed_by
resolved_by resolved_by
dismissed_by dismissed_by
details details
commenters commenters
state_transitions state_transitions
dismissal_reason dismissal_reason
present_on_default_branch present_on_default_branch
cvss cvss
] ]
end end
......
...@@ -100,22 +100,22 @@ ...@@ -100,22 +100,22 @@
context "group and project-level licensed features" do context "group and project-level licensed features" do
[[:multiple_issue_assignees, :multiple_assignees_feature_available], [[:multiple_issue_assignees, :multiple_assignees_feature_available],
[:issue_weights, :weight_feature_available], [:issue_weights, :weight_feature_available],
[:board_milestone_lists, :milestone_lists_available], [:board_milestone_lists, :milestone_lists_available],
[:board_assignee_lists, :assignee_lists_available], [:board_assignee_lists, :assignee_lists_available],
[:issuable_health_status, :health_status_feature_available], [:issuable_health_status, :health_status_feature_available],
[:scoped_labels, :scoped_labels], [:scoped_labels, :scoped_labels],
[:scoped_issue_board, :scoped_issue_board_feature_enabled]].each do |feature_name, feature_key| [:scoped_issue_board, :scoped_issue_board_feature_enabled]].each do |feature_name, feature_key|
include_examples "serializes the availability of a licensed feature", feature_name, feature_key include_examples "serializes the availability of a licensed feature", feature_name, feature_key
end end
end end
context "group-level licensed features" do context "group-level licensed features" do
[[:board_iteration_lists, :iteration_lists_available], [[:board_iteration_lists, :iteration_lists_available],
[:epics, :epic_feature_available], [:epics, :epic_feature_available],
[:iterations, :iteration_feature_available], [:iterations, :iteration_feature_available],
[:issuable_health_status, :health_status_feature_available], [:issuable_health_status, :health_status_feature_available],
[:subepics, :sub_epics_feature_available]].each do |feature_name, feature_key| [:subepics, :sub_epics_feature_available]].each do |feature_name, feature_key|
include_examples "serializes the availability of a licensed feature", feature_name, feature_key include_examples "serializes the availability of a licensed feature", feature_name, feature_key
end end
end end
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
expect(events.sort) expect(events.sort)
.to match_array ["Changed prevent merge request approval from committers from false to true", .to match_array ["Changed prevent merge request approval from committers from false to true",
"Changed prevent users from modifying MR approval rules in merge requests "\ "Changed prevent users from modifying MR approval rules in merge requests "\
"from false to true", "from false to true",
"Changed prevent merge request approval from authors from false to true", "Changed prevent merge request approval from authors from false to true",
"Changed require new approvals when new commits are added to an MR from false to true", "Changed require new approvals when new commits are added to an MR from false to true",
"Changed require user authentication for approvals from false to true", "Changed require user authentication for approvals from false to true",
"Changed require user password for approvals from false to true"].sort "Changed require user password for approvals from false to true"].sort
end end
end end
......
...@@ -333,8 +333,8 @@ ...@@ -333,8 +333,8 @@
context 'when auditable boolean column is changed' do context 'when auditable boolean column is changed' do
columns = %w[resolve_outdated_diff_discussions printing_merge_request_link_enabled columns = %w[resolve_outdated_diff_discussions printing_merge_request_link_enabled
remove_source_branch_after_merge only_allow_merge_if_pipeline_succeeds remove_source_branch_after_merge only_allow_merge_if_pipeline_succeeds
only_allow_merge_if_all_discussions_are_resolved] only_allow_merge_if_all_discussions_are_resolved]
columns.each do |column| columns.each do |column|
context "with #{column}" do context "with #{column}" do
where(:prev_value, :new_value) do where(:prev_value, :new_value) do
......
...@@ -527,7 +527,7 @@ def execute ...@@ -527,7 +527,7 @@ def execute
let(:ldap_group1) do let(:ldap_group1) do
ldap_group_entry(%W[ ldap_group_entry(%W[
#{user_dn(user1.username).upcase} #{user_dn(user1.username).upcase}
#{user_dn(user2.username)} #{user_dn(user2.username)}
]) ])
end end
......
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
it 'gathers data on operations dashboard' do it 'gathers data on operations dashboard' do
expect(subject.keys).to include(*%i[ expect(subject.keys).to include(*%i[
operations_dashboard_default_dashboard operations_dashboard_default_dashboard
operations_dashboard_users_with_projects_added operations_dashboard_users_with_projects_added
]) ])
end end
......
...@@ -273,10 +273,10 @@ def stub_sync_ssh_keys(value) ...@@ -273,10 +273,10 @@ def stub_sync_ssh_keys(value)
it 'returns the values of `memberof` if the field was present' do it 'returns the values of `memberof` if the field was present' do
example_memberof = ['CN=Group Policy Creator Owners,CN=Users,DC=Vosmaer,DC=com', example_memberof = ['CN=Group Policy Creator Owners,CN=Users,DC=Vosmaer,DC=com',
'CN=Domain Admins,CN=Users,DC=Vosmaer,DC=com', 'CN=Domain Admins,CN=Users,DC=Vosmaer,DC=com',
'CN=Enterprise Admins,CN=Users,DC=Vosmaer,DC=com', 'CN=Enterprise Admins,CN=Users,DC=Vosmaer,DC=com',
'CN=Schema Admins,CN=Users,DC=Vosmaer,DC=com', 'CN=Schema Admins,CN=Users,DC=Vosmaer,DC=com',
'CN=Administrators,CN=Builtin,DC=Vosmaer,DC=com'] 'CN=Administrators,CN=Builtin,DC=Vosmaer,DC=com']
entry['memberof'] = example_memberof entry['memberof'] = example_memberof
person = described_class.new(entry, 'ldapmain') person = described_class.new(entry, 'ldapmain')
...@@ -310,7 +310,7 @@ def stub_sync_ssh_keys(value) ...@@ -310,7 +310,7 @@ def stub_sync_ssh_keys(value)
describe '#group_cns' do describe '#group_cns' do
it 'returns only CNs from the memberof values' do it 'returns only CNs from the memberof values' do
example_memberof = ['CN=Group Policy Creator Owners,CN=Users,DC=Vosmaer,DC=com', example_memberof = ['CN=Group Policy Creator Owners,CN=Users,DC=Vosmaer,DC=com',
'CN=Administrators,CN=Builtin,DC=Vosmaer,DC=com'] 'CN=Administrators,CN=Builtin,DC=Vosmaer,DC=com']
entry['memberof'] = example_memberof entry['memberof'] = example_memberof
person = described_class.new(entry, 'ldapmain') person = described_class.new(entry, 'ldapmain')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment