mirror of
https://github.com/cmur2/dyndnsd.git
synced 2024-12-22 00:54:22 +01:00
gem: add rubocop
This commit is contained in:
parent
fc7a1cabd3
commit
9a7c20babb
13
.rubocop.yml
Normal file
13
.rubocop.yml
Normal file
@ -0,0 +1,13 @@
|
||||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: '2.3'
|
||||
|
||||
Gemspec/OrderedDependencies:
|
||||
Enabled: false
|
||||
|
||||
Metrics/LineLength:
|
||||
Max: 200
|
||||
|
||||
Style/Documentation:
|
||||
Enabled: false
|
308
.rubocop_todo.yml
Normal file
308
.rubocop_todo.yml
Normal file
@ -0,0 +1,308 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2018-02-23 11:13:02 +0100 using RuboCop version 0.52.1.
|
||||
# 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: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
||||
Layout/ExtraSpacing:
|
||||
Exclude:
|
||||
- 'dyndnsd.gemspec'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Layout/SpaceAfterComma:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/generator/bind.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment.
|
||||
Layout/SpaceAroundOperators:
|
||||
Exclude:
|
||||
- 'dyndnsd.gemspec'
|
||||
|
||||
# Offense count: 38
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
||||
# SupportedStyles: space, no_space, compact
|
||||
# SupportedStylesForEmptyBraces: space, no_space
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: final_newline, final_blank_line
|
||||
Layout/TrailingBlankLines:
|
||||
Exclude:
|
||||
- 'spec/support/dummy_database.rb'
|
||||
|
||||
# Offense count: 8
|
||||
# Cop supports --auto-correct.
|
||||
Layout/TrailingWhitespace:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/database.rb'
|
||||
- 'lib/dyndnsd/updater/command_with_bind_zone.rb'
|
||||
- 'spec/support/dummy_database.rb'
|
||||
|
||||
# Offense count: 4
|
||||
Lint/IneffectiveAccessModifier:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Lint/ScriptPermission:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
||||
Lint/UnusedMethodArgument:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- 'spec/daemon_spec.rb'
|
||||
|
||||
# Offense count: 5
|
||||
Metrics/AbcSize:
|
||||
Max: 31
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
Metrics/BlockLength:
|
||||
Max: 159
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ClassLength:
|
||||
Max: 149
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/MethodLength:
|
||||
Max: 19
|
||||
|
||||
# Offense count: 2
|
||||
Naming/AccessorMethodName:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
||||
# NamePrefix: is_, has_, have_
|
||||
# NamePrefixBlacklist: is_, has_, have_
|
||||
# NameWhitelist: is_a?
|
||||
# MethodDefinitionMacros: define_method, define_singleton_method
|
||||
Naming/PredicateName:
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect.
|
||||
Security/JSONLoad:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/database.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Security/YAMLLoad:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: always, conditionals
|
||||
Style/AndOr:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/ColonMethodCall:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
||||
# SupportedStyles: assign_to_condition, assign_inside_condition
|
||||
Style/ConditionalAssignment:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/database.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Style/DefWithParentheses:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: format, sprintf, percent
|
||||
Style/FormatString:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: .
|
||||
# SupportedStyles: annotated, template, unannotated
|
||||
Style/FormatStringToken:
|
||||
EnforcedStyle: unannotated
|
||||
|
||||
# Offense count: 15
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: when_needed, always, never
|
||||
Style/FrozenStringLiteralComment:
|
||||
Exclude:
|
||||
- 'Gemfile'
|
||||
- 'Rakefile'
|
||||
- 'dyndnsd.gemspec'
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/database.rb'
|
||||
- 'lib/dyndnsd/generator/bind.rb'
|
||||
- 'lib/dyndnsd/helper.rb'
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
- 'lib/dyndnsd/updater/command_with_bind_zone.rb'
|
||||
- 'lib/dyndnsd/version.rb'
|
||||
- 'spec/daemon_spec.rb'
|
||||
- 'spec/spec_helper.rb'
|
||||
- 'spec/support/dummy_database.rb'
|
||||
- 'spec/support/dummy_updater.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: MinBodyLength.
|
||||
Style/GuardClause:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||
Style/HashSyntax:
|
||||
EnforcedStyle: hash_rockets
|
||||
|
||||
# Offense count: 2
|
||||
Style/IdenticalConditionalBranches:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: InverseMethods, InverseBlocks.
|
||||
Style/InverseMethods:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/MethodCallWithoutArgsParentheses:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/MutableConstant:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/version.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: both, prefix, postfix
|
||||
Style/NegatedIf:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/helper.rb'
|
||||
|
||||
# Offense count: 8
|
||||
# Cop supports --auto-correct.
|
||||
Style/Not:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/helper.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: short, verbose
|
||||
Style/PreferredHashMethods:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/RedundantBegin:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd/helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowAsExpressionSeparator.
|
||||
Style/Semicolon:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: .
|
||||
# SupportedStyles: use_perl_names, use_english_names
|
||||
Style/SpecialGlobalVars:
|
||||
EnforcedStyle: use_perl_names
|
||||
|
||||
# Offense count: 80
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
||||
# SupportedStyles: single_quotes, double_quotes
|
||||
Style/StringLiterals:
|
||||
Exclude:
|
||||
- 'dyndnsd.gemspec'
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/generator/bind.rb'
|
||||
- 'lib/dyndnsd/responder/dyndns_style.rb'
|
||||
- 'lib/dyndnsd/responder/rest_style.rb'
|
||||
- 'lib/dyndnsd/version.rb'
|
||||
- 'spec/daemon_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: MinSize.
|
||||
# SupportedStyles: percent, brackets
|
||||
Style/SymbolArray:
|
||||
EnforcedStyle: brackets
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
# IgnoredMethods: respond_to, define_method
|
||||
Style/SymbolProc:
|
||||
Exclude:
|
||||
- 'lib/dyndnsd.rb'
|
||||
- 'lib/dyndnsd/database.rb'
|
4
Rakefile
4
Rakefile
@ -1,6 +1,8 @@
|
||||
require 'bundler/gem_tasks'
|
||||
require 'rspec/core/rake_task'
|
||||
require 'rubocop/rake_task'
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
RuboCop::RakeTask.new
|
||||
|
||||
task :default => :spec
|
||||
task :default => [:rubocop, :spec]
|
||||
|
@ -28,4 +28,5 @@ Gem::Specification.new do |s|
|
||||
s.add_development_dependency 'rake'
|
||||
s.add_development_dependency 'rspec'
|
||||
s.add_development_dependency 'rack-test'
|
||||
s.add_development_dependency 'rubocop', '~> 0.52.1'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user