Skip to content

Commit

Permalink
Merge tag '4.6.0-rc'
Browse files Browse the repository at this point in the history
2019 Q2 code release
  • Loading branch information
agnessa committed Jul 17, 2019
2 parents 6fb1b49 + 4730bd6 commit f16ab92
Show file tree
Hide file tree
Showing 830 changed files with 25,471 additions and 16,271 deletions.
70 changes: 33 additions & 37 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
engines:
rubocop:
enabled: true
brakeman:
enabled: true
bundler-audit:
enabled: true
duplication:
enabled: true
exclude_paths:
- app/controllers/
- app/admin/api/v3/
- app/models/actor_attributes.rb
- app/models/place_attributes.rb
- app/models/node.rb
- app/models/node_ind.rb
- app/models/node_qual.rb
- app/models/node_quant.rb
- app/models/flow_stats_for_node.rb
- app/models/node_type.rb
config:
languages:
- ruby:
apexmetrics:
enabled: true
reek:
enabled: true

version: '2' # required to adjust maintainability checks
checks:
argument-count:
Expand Down Expand Up @@ -59,13 +31,37 @@ checks:
config:
threshold: # language-specific defaults. an override will affect all languages.

ratings:
paths:
- app/**
- lib/**
- "**.rb"
exclude_paths:
- spec/**/*
plugins:
rubocop:
enabled: true
channel: rubocop-0-67
brakeman:
enabled: true
bundler-audit:
enabled: true
duplication:
enabled: true
exclude_paths:
- app/controllers/
- app/admin/api/v3/
- app/models/actor_attributes.rb
- app/models/place_attributes.rb
- app/models/node.rb
- app/models/node_ind.rb
- app/models/node_qual.rb
- app/models/node_quant.rb
- app/models/flow_stats_for_node.rb
- app/models/node_type.rb
config:
languages:
- ruby:
apexmetrics:
enabled: true
reek:
enabled: true

exclude_patterns:
- "db/**/*"
- "lib/db_helpers/**/*" # db helpers, mostly temporary
- "spec/**/*"
- "**/vendor/**/*"
- db/**/*
- 'lib/db_helpers/**/*' # db helpers, mostly temporary
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ frontend/gis/cartodb/cartodb-config.json
frontend/scripts/coverage
frontend/docs/dist
frontend/package-lock.json

public/sitemap*
10 changes: 9 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require: rubocop-performance

inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.6
Exclude:
- 'bin/*'
- 'db/migrate/*'
Expand Down Expand Up @@ -41,6 +43,9 @@ Metrics/LineLength:
- 'app/services/api/v3/actors/**/*'
- 'app/services/api/v3/places/**/*'

Style/Alias:
Enabled: false

Style/AndOr:
Enabled: false

Expand Down Expand Up @@ -75,6 +80,9 @@ Style/MixinUsage:
Style/PercentLiteralDelimiters:
Enabled: false

Style/PerlBackrefs:
Enabled: false

Style/RegexpLiteral:
EnforcedStyle: slashes
AllowInnerSlashes: true
Expand Down
173 changes: 129 additions & 44 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,134 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-05-30 14:48:46 +0200 using RuboCop version 0.51.0.
# on 2019-07-09 16:54:18 +0100 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: 6
# Offense count: 37
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/AlignHash:
Exclude:
- 'lib/tasks/auto_annotate_models.rake'

# Offense count: 3
# Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation:
Exclude:
- 'app/services/api/v3/import/stats.rb'

# Offense count: 39
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.
Layout/EmptyLineAfterGuardClause:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Layout/EmptyLinesAroundArguments:
Exclude:
- 'lib/tasks/charts.rake'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
# SupportedStylesAlignWith: keyword, variable, start_of_line
Layout/EndAlignment:
Exclude:
- 'app/services/api/v3/actors/top_nodes_summary.rb'

# Offense count: 16
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/IndentArray:
EnforcedStyle: consistent

# Offense count: 3
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/MultilineOperationIndentation:
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceBeforeBlockBraces:
Exclude:
- 'app/models/api/v3/context.rb'
- 'spec/services/api/v3/manage_download_attributes_spec.rb'

# Offense count: 1
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
Exclude:
- 'spec/controllers/admin/top_profiles_controller_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: final_newline, final_blank_line
Layout/TrailingBlankLines:
Exclude:
- 'spec/controllers/api/v3/newsletter_subscriptions_controller_spec.rb'
- 'Rakefile'
- 'config/deploy/staging.rb'

# Offense count: 2
Lint/AmbiguousOperator:
Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/services/api/v3/manage_download_attributes_spec.rb'

# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'spec/support/helpers/zip_helpers.rb'

# Offense count: 1
Lint/ShadowingOuterLocalVariable:
Exclude:
- 'spec/factories/api/v3/api_v3_country_properties.rb'
- 'lib/tasks/charts.rake'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'cms_ideas/batch_save_form.rb'

# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'lib/tasks/db_remote_import.rake'

# Offense count: 50
# Offense count: 65
Metrics/AbcSize:
Max: 32

# Offense count: 1
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 28
Max: 31

# Offense count: 14
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 285
Max: 288

# Offense count: 6
Metrics/CyclomaticComplexity:
Max: 8
Max: 9

# Offense count: 2
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 91
# Offense count: 169
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 62

# Offense count: 109
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 47
Metrics/ModuleLength:
Max: 159

# Offense count: 6
# Offense count: 9
Metrics/PerceivedComplexity:
Max: 9
Max: 10

# Offense count: 1
Naming/AccessorMethodName:
Expand All @@ -86,45 +144,72 @@ Naming/AccessorMethodName:
Naming/PredicateName:
Exclude:
- 'spec/**/*'
- 'app/models/api/v3/context.rb'
- 'app/models/concerns/api/v3/is_downloadable.rb'

# Offense count: 13
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
Exclude:
- 'lib/db_helpers/search_path_helpers.rb'
- 'lib/hash_sorter.rb'
- 'spec/services/api/v3/dashboards/charts/single_year_ncont_overview_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'app/models/api/v3/chart.rb'
- 'spec/services/api/v3/nodes/filter_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
- 'app/services/api/v3/database_validation/checks/declared_temporal_matches_data.rb'

# Offense count: 1
Style/DateTime:
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'app/models/content/post.rb'
- 'spec/rails_helper.rb'

# Offense count: 1
# Offense count: 3
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'app/controllers/application_controller.rb'
- 'app/services/api/v3/download/flow_download_query_builder.rb'
- 'app/services/api/v3/table_partitions.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Exclude:
- 'app/services/api/v3/flows/filter.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantSelf:
# Configuration parameters: EnforcedStyle, MinBodyLength.
# SupportedStyles: skip_modifier_ifs, always
Style/Next:
Exclude:
- 'app/workers/database_update_worker.rb'
- 'lib/tasks/charts.rake'

# Offense count: 6
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantBegin:
Exclude:
- 'spec/support/examples/database_update_worker.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'spec/responses/api/v3/nodes_search_spec.rb'
- 'spec/workers/database_update_worker_spec.rb'
- 'spec/services/api/v3/download/precomputed_download_spec.rb'
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.2
2.6.3
Loading

0 comments on commit f16ab92

Please sign in to comment.