Skip to content

Commit

Permalink
rubocop: correct style
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed May 31, 2021
1 parent bfc1c3d commit 23ec6f9
Show file tree
Hide file tree
Showing 64 changed files with 1,544 additions and 1,115 deletions.
26 changes: 26 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
inherit_from: .rubocop_todo.yml

inherit_gem:
rubocop-rock: defaults.yml

inherit_mode:
merge:
- Exclude
- AllowedNames

AllCops:
TargetRubyVersion: "2.5"

Style/MultilineMemoization:
EnforcedStyle: braces

Naming/MethodParameterName:
AllowedNames:
- as
- m
- kw
- x
- y

Metrics/AbcSize:
Max: 17
334 changes: 334 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 1000000`
# on 2021-05-31 20:38:43 -0300 using RuboCop version 0.83.0.
# 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: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: squiggly, active_support, powerpack, unindent
Layout/HeredocIndentation:
Exclude:
- 'test/cli/datastore_test.rb'

# Offense count: 254
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/daru/frame_builder.rb'
- 'lib/syskit/log/daru/path_builder.rb'
- 'lib/syskit/log/datastore.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/datastore/normalize.rb'
- 'lib/syskit/log/exceptions.rb'
- 'lib/syskit/log/extensions/configuration.rb'
- 'lib/syskit/log/extensions/deployment_group.rb'
- 'lib/syskit/log/lazy_data_stream.rb'
- 'lib/syskit/log/plugin.rb'
- 'lib/syskit/log/shell_interface.rb'
- 'syskit-log.gemspec'
- 'test/cli/datastore_test.rb'
- 'test/datastore/dataset_test.rb'
- 'test/datastore/import_test.rb'
- 'test/datastore/normalize_test.rb'
- 'test/datastore_test.rb'
- 'test/deployment_group_test.rb'
- 'test/deployment_test.rb'
- 'test/dsl_test.rb'
- 'test/models/deployment_test.rb'
- 'test/models/replay_task_context_test.rb'
- 'test/replay_manager_test.rb'
- 'test/rock_stream_matcher_test.rb'
- 'test/streams_test.rb'
- 'test/task_streams_test.rb'
- 'test/test_helper.rb'

# Offense count: 33
# Configuration parameters: IgnoredMethods, Max.
Metrics/AbcSize:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/cli/replay.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/datastore.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/datastore/import.rb'
- 'lib/syskit/log/datastore/index_build.rb'
- 'lib/syskit/log/datastore/normalize.rb'
- 'lib/syskit/log/dsl.rb'
- 'lib/syskit/log/exceptions.rb'
- 'lib/syskit/log/replay_manager.rb'
- 'lib/syskit/log/roby_sql_index/index.rb'
- 'lib/syskit/log/streams.rb'

# Offense count: 14
# Configuration parameters: CountComments, Max, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Exclude:
- '**/*.gemspec'
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/daru/frame_builder.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/datastore/normalize.rb'
- 'test/cli/datastore_test.rb'
- 'test/deployment_group_test.rb'
- 'test/deployment_test.rb'
- 'test/dsl_test.rb'
- 'test/replay_manager_test.rb'
- 'test/task_streams_test.rb'

# Offense count: 1
# Configuration parameters: CountComments, Max.
Metrics/ClassLength:
Exclude:
- 'test/datastore/dataset_test.rb'

# Offense count: 8
# Configuration parameters: IgnoredMethods, Max.
Metrics/CyclomaticComplexity:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/dsl.rb'
- 'lib/syskit/log/streams.rb'

# Offense count: 4
# Configuration parameters: Max, CountKeywordArgs.
Metrics/ParameterLists:
Exclude:
- 'lib/syskit/log/datastore/normalize.rb'
- 'lib/syskit/log/extensions/deployment_group.rb'
- 'lib/syskit/log/lazy_data_stream.rb'

# Offense count: 8
# Configuration parameters: IgnoredMethods, Max.
Metrics/PerceivedComplexity:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/dsl.rb'
- 'lib/syskit/log/streams.rb'

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'lib/roby-syskit-log.rb'

# Offense count: 4
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Exclude:
- 'test/cli/datastore_test.rb'

# Offense count: 2
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
Naming/MethodParameterName:
Exclude:
- 'lib/syskit/log/rock_stream_matcher.rb'
- 'lib/syskit/log/streams.rb'

# Offense count: 3
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, normalcase, non_integer
Naming/VariableNumber:
Exclude:
- 'test/datastore/import_test.rb'

# Offense count: 3
# Cop supports --auto-correct.
Security/YAMLLoad:
Exclude:
- 'test/datastore/dataset_test.rb'

# Offense count: 39
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/cli/replay.rb'
- 'lib/syskit/log/data_replay_task.rb'
- 'lib/syskit/log/datastore.rb'
- 'lib/syskit/log/datastore/dataset.rb'
- 'lib/syskit/log/datastore/import.rb'
- 'lib/syskit/log/datastore/index_build.rb'
- 'lib/syskit/log/datastore/normalize.rb'
- 'lib/syskit/log/deployment.rb'
- 'lib/syskit/log/exceptions.rb'
- 'lib/syskit/log/extensions.rb'
- 'lib/syskit/log/extensions/configuration.rb'
- 'lib/syskit/log/extensions/deployment_group.rb'
- 'lib/syskit/log/extensions/execution_engine.rb'
- 'lib/syskit/log/extensions/instance_requirements.rb'
- 'lib/syskit/log/lazy_data_stream.rb'
- 'lib/syskit/log/models/deployment.rb'
- 'lib/syskit/log/plugin.rb'
- 'lib/syskit/log/replay_manager.rb'
- 'lib/syskit/log/rock_stream_matcher.rb'
- 'lib/syskit/log/shell_interface.rb'
- 'lib/syskit/log/streams.rb'
- 'lib/syskit/log/task_streams.rb'
- 'test/cli/datastore_test.rb'
- 'test/datastore/dataset_test.rb'
- 'test/datastore/import_test.rb'
- 'test/datastore/index_build_test.rb'
- 'test/datastore/normalize_test.rb'
- 'test/datastore_test.rb'
- 'test/deployment_group_test.rb'
- 'test/deployment_test.rb'
- 'test/models/deployment_test.rb'
- 'test/models/replay_task_context_test.rb'
- 'test/replay_manager_test.rb'
- 'test/rock_stream_matcher_test.rb'
- 'test/shell_interface_test.rb'
- 'test/streams_test.rb'
- 'test/task_streams_test.rb'
- 'test/test_helper.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/ColonMethodCall:
Exclude:
- 'lib/syskit/log/dsl/periods.rb'

# Offense count: 11
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/cli/replay.rb'
- 'lib/syskit/log/daru/create_aligned_frame.rb'
- 'lib/syskit/log/datastore/import.rb'
- 'lib/syskit/log/datastore/index_build.rb'
- 'lib/syskit/log/datastore/normalize.rb'
- 'lib/syskit/log/plugin.rb'
- 'lib/syskit/scripts/datastore.rb'
- 'lib/syskit/scripts/replay.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty, nil, both
Style/EmptyElse:
Exclude:
- 'lib/syskit/log/daru/frame_builder.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/Encoding:
Exclude:
- 'syskit-log.gemspec'

# Offense count: 1
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'syskit-log.gemspec'

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/dsl.rb'

# Offense count: 4
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'

# Offense count: 7
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/daru/path_builder.rb'
- 'lib/syskit/log/datastore.rb'
- 'lib/syskit/log/exceptions.rb'
- 'lib/syskit/log/models/deployment.rb'

# Offense count: 5
# Cop supports --auto-correct.
Style/IfUnlessModifier:
Exclude:
- 'lib/syskit/log/daru/frame_builder.rb'
- 'lib/syskit/log/datastore.rb'
- 'lib/syskit/log/dsl.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
Style/MethodCallWithoutArgsParentheses:
Exclude:
- 'test/replay_manager_test.rb'

# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/syskit/log/roby_sql_index/accessors.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: MinDigits, Strict.
Style/NumericLiterals:
Exclude:
- 'test/cli/datastore_test.rb'
- 'test/datastore/dataset_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantSelf:
Exclude:
- 'lib/syskit/log/task_streams.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Exclude:
- 'test/streams_test.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'test/datastore/dataset_test.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
Exclude:
- 'lib/syskit/log/cli/datastore.rb'
- 'lib/syskit/log/datastore.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowNamedUnderscoreVariables.
Style/TrailingUnderscoreVariable:
Exclude:
- 'test/cli/datastore_test.rb'
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source 'https://rubygems.org'
# frozen_string_literal: true

source "https://rubygems.org"

# Specify your gem's dependencies in syskit-pocolog.gemspec
gemspec
10 changes: 6 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList['test/**/*_test.rb']
t.warning = false
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
t.warning = false
end

task :default
6 changes: 4 additions & 2 deletions lib/roby-syskit-log.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
require 'syskit/log'
Roby.app.register_plugin 'syskit-pocolog', Syskit::Log::Plugin
# frozen_string_literal: true

require "syskit/log"
Roby.app.register_plugin "syskit-pocolog", Syskit::Log::Plugin
Loading

0 comments on commit 23ec6f9

Please sign in to comment.