puppetlabs/facter-ng

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
---
inherit_from: .rubocop_todo.yml

AllCops:
  TargetRubyVersion: 2.3

require:
  - rubocop-performance
  - rubocop-rspec

Layout/LineLength:
  Max: 120

Lint/RescueException:
  Exclude:
    - 'lib/custom_facts/util/parser.rb'

Lint/RaiseException:
  Enabled: true

Lint/StructNewOverride:
  Enabled: true

Metrics/MethodLength:
  Max: 20
  Exclude:
    - 'lib/custom_facts/util/values.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/base.rb'
    - 'lib/framework/detector/os_detector.rb'
    - 'lib/resolvers/bsd/ffi/ffi_helper.rb'

Metrics/ModuleLength:
  Max: 100
  Exclude:
    - 'lib/facter.rb'
    - 'lib/facter-ng.rb'

Metrics/BlockLength:
  Exclude:
    - !ruby/regexp /(?:(?!.+_spec.rb).)*$/

Naming/ClassAndModuleCamelCase:
  Exclude:
    - 'spec/mocks/**/*'

Metrics/AbcSize:
  Max: 16
  Exclude:
    - 'spec/custom_facts/util/parser_spec.rb'
    - 'spec/custom_facts/core/logging_spec.rb'
    - 'lib/custom_facts/util/values.rb'
    - 'lib/custom_facts/util/loader.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/base.rb'
    - 'lib/custom_facts/core/resolvable.rb'
    - 'lib/resolvers/bsd/ffi/ffi_helper.rb'

Metrics/PerceivedComplexity:
  Exclude:
    - 'lib/custom_facts/util/values.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/posix.rb'

Metrics/CyclomaticComplexity:
  Exclude:
    - 'lib/custom_facts/util/values.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/posix.rb'
    - 'lib/framework/detector/os_detector.rb'

Metrics/ClassLength:
  Exclude:
    - 'lib/custom_facts/util/fact.rb'
    - 'lib/resolvers/windows/networking_resolver.rb'
    - 'lib/custom_facts/util/collection.rb'
    - 'lib/framework/core/options/option_store.rb'
    - 'lib/framework/cli/cli.rb'
    - 'lib/resolvers/networking_linux_resolver.rb'
    - 'lib/framework/core/cache_manager.rb'

Naming/AccessorMethodName:
  Exclude:
    - 'lib/custom_facts/core/suitable.rb'

Naming/MethodName:
  Exclude:
    - 'spec/mocks/**/*'

Naming/PredicateName:
  Exclude:
    - 'lib/custom_facts/core/suitable.rb'

Naming/FileName:
  Exclude:
    - 'lib/facter.rb'
    - 'agent/lib/facter-ng.rb'

RSpec/ExampleLength:
  Enabled: false

RSpec/DescribedClass:
  EnforcedStyle: explicit

RSpec/NestedGroups:
  Max: 5

Style/Documentation:
  Enabled: false

Style/ClassVars:
  Exclude:
    - !ruby/regexp /(?:(?!.+_resolver.rb).)*$/

Style/FrozenStringLiteralComment:
  Exclude:
    - 'spec/custom_facts/util/normalization_spec.rb'
    - 'spec/custom_facts/shared_contexts/platform.rb'
    - 'spec/custom_facts/core/execution/windows_spec.rb'
    - 'spec/custom_facts/core/execution/posix_spec.rb'
    - 'lib/custom_facts/util/resolution.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/posix.rb'

Style/TrivialAccessors:
  AllowDSLWriters: true

Style/CaseEquality:
  Exclude:
    - 'spec/custom_facts/util/confine_spec.rb'
    - 'lib/custom_facts/util/confine.rb'

Style/DoubleNegation:
  Exclude:
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/util/confine.rb'
    - 'lib/custom_facts/core/execution/windows.rb'
    - 'lib/custom_facts/core/execution/posix.rb'

Style/MethodMissingSuper:
  Exclude:
    - 'lib/facter.rb'

Style/MissingRespondToMissing:
  Exclude:
    - 'lib/facter.rb'

Style/StderrPuts:
  Exclude:
    - 'lib/custom_facts/core/logging.rb'

Style/ModuleFunction:
  Exclude:
    - 'lib/custom_facts/core/logging.rb'

Style/HashEachMethods:
  Enabled: false  # not implemted in ruby 2.3

Style/HashTransformKeys:
  Enabled: false  # not implemted in ruby 2.3

Style/HashTransformValues:
  Enabled: false  # not implemted in ruby 2.3