Merge pull request #3637 from consul/remove_rubocop_rules
Remove unused rubocop rules
This commit is contained in:
213
.rubocop.yml
213
.rubocop.yml
@@ -1,32 +1,8 @@
|
||||
inherit_from: .rubocop_basic.yml
|
||||
|
||||
Bundler/InsecureProtocolSource:
|
||||
Enabled: true
|
||||
|
||||
Gemspec/DuplicatedAssignment:
|
||||
Enabled: true
|
||||
|
||||
Gemspec/OrderedDependencies:
|
||||
Enabled: true
|
||||
|
||||
Gemspec/RequiredRubyVersion:
|
||||
Enabled: true
|
||||
|
||||
Performance/Caller:
|
||||
Enabled: true
|
||||
|
||||
Performance/CaseWhenSplat:
|
||||
Enabled: true
|
||||
|
||||
Performance/Casecmp:
|
||||
Enabled: true
|
||||
|
||||
Performance/CompareWithBlock:
|
||||
Enabled: true
|
||||
|
||||
Performance/Count:
|
||||
Enabled: true
|
||||
|
||||
Performance/Detect:
|
||||
Enabled: true
|
||||
|
||||
@@ -36,66 +12,12 @@ Performance/DoubleStartEndWith:
|
||||
Performance/EndWith:
|
||||
Enabled: true
|
||||
|
||||
Performance/FixedSize:
|
||||
Enabled: true
|
||||
|
||||
Performance/FlatMap:
|
||||
Enabled: true
|
||||
|
||||
Performance/RangeInclude:
|
||||
Enabled: true
|
||||
|
||||
Performance/RedundantBlockCall:
|
||||
Enabled: true
|
||||
|
||||
Performance/RedundantMatch:
|
||||
Enabled: true
|
||||
|
||||
Performance/RedundantMerge:
|
||||
Enabled: true
|
||||
|
||||
Performance/RegexpMatch:
|
||||
Enabled: true
|
||||
|
||||
Performance/ReverseEach:
|
||||
Enabled: true
|
||||
|
||||
Performance/Size:
|
||||
Enabled: true
|
||||
|
||||
Performance/StartWith:
|
||||
Enabled: true
|
||||
|
||||
Performance/StringReplacement:
|
||||
Enabled: true
|
||||
|
||||
Performance/TimesMap:
|
||||
Enabled: true
|
||||
|
||||
Performance/UnfreezeString:
|
||||
Enabled: true
|
||||
|
||||
Performance/UriDefaultParser:
|
||||
Enabled: true
|
||||
|
||||
Rails/ActiveSupportAliases:
|
||||
Enabled: true
|
||||
|
||||
Rails/Blank:
|
||||
Enabled: true
|
||||
|
||||
Rails/CreateTableWithTimestamps:
|
||||
Enabled: true
|
||||
|
||||
Rails/Delegate:
|
||||
Enabled: true
|
||||
|
||||
Rails/DelegateAllowBlank:
|
||||
Enabled: true
|
||||
|
||||
Rails/DynamicFindBy:
|
||||
Enabled: true
|
||||
|
||||
Rails/EnumUniqueness:
|
||||
Enabled: true
|
||||
|
||||
@@ -105,9 +27,6 @@ Rails/EnvironmentComparison:
|
||||
Rails/Exit:
|
||||
Enabled: true
|
||||
|
||||
Rails/FilePath:
|
||||
Enabled: true
|
||||
|
||||
Rails/FindBy:
|
||||
Enabled: true
|
||||
|
||||
@@ -123,156 +42,24 @@ Rails/HasManyOrHasOneDependent:
|
||||
Rails/InverseOf:
|
||||
Enabled: true
|
||||
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Enabled: true
|
||||
|
||||
Rails/NotNullColumn:
|
||||
Enabled: true
|
||||
|
||||
Rails/Output:
|
||||
Enabled: true
|
||||
|
||||
Rails/OutputSafety:
|
||||
Enabled: true
|
||||
|
||||
Rails/Present:
|
||||
Enabled: true
|
||||
|
||||
Rails/ReadWriteAttribute:
|
||||
Enabled: true
|
||||
|
||||
Rails/RedundantReceiverInWithOptions:
|
||||
Enabled: true
|
||||
|
||||
Rails/ReversibleMigration:
|
||||
Enabled: true
|
||||
|
||||
Rails/SaveBang:
|
||||
Enabled: true
|
||||
|
||||
Rails/ScopeArgs:
|
||||
Enabled: true
|
||||
|
||||
Rails/SkipsModelValidations:
|
||||
Enabled: true
|
||||
|
||||
Rails/UniqBeforePluck:
|
||||
Enabled: true
|
||||
|
||||
RSpec/AlignLeftLetBrace:
|
||||
Enabled: false
|
||||
|
||||
RSpec/AlignRightLetBrace:
|
||||
Enabled: false
|
||||
|
||||
RSpec/AnyInstance:
|
||||
Enabled: false
|
||||
|
||||
RSpec/BeEql:
|
||||
Enabled: true
|
||||
|
||||
Capybara/FeatureMethods:
|
||||
Enabled: false
|
||||
|
||||
RSpec/ContextWording:
|
||||
Enabled: false
|
||||
|
||||
RSpec/DescribeClass:
|
||||
Enabled: true
|
||||
|
||||
RSpec/DescribeMethod:
|
||||
Enabled: true
|
||||
|
||||
RSpec/DescribeSymbol:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExampleLength:
|
||||
Enabled: false
|
||||
|
||||
RSpec/ExpectActual:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExpectInHook:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ExpectOutput:
|
||||
Enabled: true
|
||||
|
||||
RSpec/FilePath:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ImplicitExpect:
|
||||
Enabled: true
|
||||
EnforcedStyle: should
|
||||
|
||||
RSpec/InstanceSpy:
|
||||
Enabled: true
|
||||
|
||||
RSpec/InstanceVariable:
|
||||
Enabled: true
|
||||
|
||||
RSpec/InvalidPredicateMatcher:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ItBehavesLike:
|
||||
Enabled: true
|
||||
|
||||
RSpec/IteratedExpectation:
|
||||
Enabled: true
|
||||
|
||||
RSpec/LeadingSubject:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MessageChain:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MessageExpectation:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MessageSpies:
|
||||
Enabled: true
|
||||
EnforcedStyle: receive
|
||||
|
||||
RSpec/MultipleDescribes:
|
||||
Enabled: true
|
||||
|
||||
RSpec/MultipleExpectations:
|
||||
Enabled: false
|
||||
|
||||
RSpec/MultipleSubjects:
|
||||
Enabled: true
|
||||
|
||||
RSpec/NamedSubject:
|
||||
Enabled: false
|
||||
|
||||
RSpec/NestedGroups:
|
||||
Enabled: true
|
||||
Max: 4
|
||||
|
||||
RSpec/PredicateMatcher:
|
||||
Enabled: true
|
||||
|
||||
Rails/HttpStatus:
|
||||
Enabled: true
|
||||
|
||||
RSpec/RepeatedDescription:
|
||||
Enabled: true
|
||||
|
||||
RSpec/ReturnFromStub:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SharedContext:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SingleArgumentMessageChain:
|
||||
Enabled: true
|
||||
|
||||
RSpec/SubjectStub:
|
||||
Enabled: true
|
||||
|
||||
RSpec/VerifiedDoubles:
|
||||
Enabled: true
|
||||
|
||||
Security/Eval:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ Lint/UselessAssignment:
|
||||
|
||||
Metrics/LineLength:
|
||||
Max: 110
|
||||
Severity: refactor
|
||||
|
||||
Rails/ActionFilter:
|
||||
Enabled: true
|
||||
|
||||
@@ -25,7 +25,7 @@ module ModerateActions
|
||||
@resources.accessible_by(current_ability, :ignore_flag).each(&:ignore_flag)
|
||||
|
||||
elsif params[:block_authors].present?
|
||||
author_ids = @resources.pluck(author_id).uniq
|
||||
author_ids = @resources.pluck(author_id)
|
||||
User.where(id: author_ids).accessible_by(current_ability, :block).each { |user| block_user user }
|
||||
end
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class Tracking::BudgetInvestmentsController < Tracking::BaseController
|
||||
|
||||
def heading_filters
|
||||
investments = @budget.investments.by_tracker(current_user.tracker&.id).distinct
|
||||
investment_headings = Budget::Heading.where(id: investments.pluck(:heading_id).uniq)
|
||||
investment_headings = Budget::Heading.where(id: investments.pluck(:heading_id))
|
||||
.order(name: :asc)
|
||||
all_headings_filter = [
|
||||
{
|
||||
|
||||
@@ -18,29 +18,29 @@ class UserSegments
|
||||
end
|
||||
|
||||
def self.all_proposal_authors
|
||||
author_ids(Proposal.pluck(:author_id).uniq)
|
||||
author_ids(Proposal.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.proposal_authors
|
||||
author_ids(Proposal.not_archived.not_retired.pluck(:author_id).uniq)
|
||||
author_ids(Proposal.not_archived.not_retired.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.investment_authors
|
||||
author_ids(current_budget_investments.pluck(:author_id).uniq)
|
||||
author_ids(current_budget_investments.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.feasible_and_undecided_investment_authors
|
||||
unfeasible_and_finished_condition = "feasibility = 'unfeasible' and valuation_finished = true"
|
||||
investments = current_budget_investments.where.not(unfeasible_and_finished_condition)
|
||||
author_ids(investments.pluck(:author_id).uniq)
|
||||
author_ids(investments.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.selected_investment_authors
|
||||
author_ids(current_budget_investments.selected.pluck(:author_id).uniq)
|
||||
author_ids(current_budget_investments.selected.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.winner_investment_authors
|
||||
author_ids(current_budget_investments.winners.pluck(:author_id).uniq)
|
||||
author_ids(current_budget_investments.winners.pluck(:author_id))
|
||||
end
|
||||
|
||||
def self.not_supported_on_current_budget
|
||||
|
||||
Reference in New Issue
Block a user