You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

.rubocop.yml 4.3 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. inherit_from: .rubocop_todo.yml
  2. require:
  3. - rubocop-packaging
  4. AllCops:
  5. NewCops: disable
  6. # Keep this inline with the lowest ruby-* version in circleci/config.yml and
  7. # the version in the gemspec
  8. TargetRubyVersion: 2.6
  9. # Cop names are not displayed in offense messages by default. Change behavior
  10. # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
  11. # option.
  12. DisplayCopNames: true
  13. # Style guide URLs are not displayed in offense messages by default. Change
  14. # behavior by overriding `DisplayStyleGuide`, or by giving the
  15. # `-S/--display-style-guide` option.
  16. DisplayStyleGuide: true
  17. Exclude:
  18. - 'bin/*'
  19. - 'tmp/**/*'
  20. - 'vendor/**/*'
  21. - 'temp_app/**/*'
  22. - 'cck/features/**/*'
  23. Layout/EndOfLine:
  24. EnforcedStyle: lf
  25. # Disabling this cop until the minimum Ruby version is >= 2.3 as squiggly
  26. # heredocs '<<~' were introduced then. The files below are the current ones
  27. # with offenses
  28. Layout/HeredocIndentation:
  29. Exclude:
  30. - 'features/lib/support/feature_factory.rb'
  31. - 'lib/cucumber/cli/options.rb'
  32. - 'lib/cucumber/cli/profile_loader.rb'
  33. - 'spec/cucumber/cli/configuration_spec.rb'
  34. - 'spec/cucumber/cli/profile_loader_spec.rb'
  35. - 'spec/cucumber/formatter/pretty_spec.rb'
  36. # Reviewed: Formatters put trailing spaces after things like 'Feature: '
  37. # In pretty_spec.rb, progress_spec.rb offences look false,
  38. # as the trailing spaces are in multiline string literals
  39. Layout/TrailingWhitespace:
  40. Exclude:
  41. - 'spec/cucumber/formatter/pretty_spec.rb'
  42. - 'spec/cucumber/formatter/progress_spec.rb'
  43. # Reviewed: please see PR-1022 for details on why this cop is disabled:
  44. # https://github.com/cucumber/cucumber-ruby/pull/1022
  45. Lint/AmbiguousOperator:
  46. Enabled: false
  47. # We exclude proto_world for documentation (rdoc) purpose
  48. Lint/UselessMethodDefinition:
  49. Enabled: true
  50. Exclude:
  51. - 'lib/cucumber/glue/proto_world.rb'
  52. Metrics/AbcSize:
  53. Max: 45
  54. Metrics/BlockLength:
  55. CountComments: false
  56. Exclude:
  57. - './cucumber.gemspec'
  58. - './spec/**/*'
  59. - 'cck/spec/**/*'
  60. Metrics/ClassLength:
  61. Max: 375
  62. Exclude:
  63. - 'lib/cucumber/cli/options.rb'
  64. Metrics/CyclomaticComplexity:
  65. Max: 12
  66. # A line length of 200 covers most violations in the repo while still being
  67. # a more up to date length given today's screen sizes
  68. Layout/LineLength:
  69. Max: 200
  70. Metrics/ModuleLength:
  71. Max: 150
  72. Exclude:
  73. - './spec/**/*'
  74. - 'cck/spec/**/*'
  75. Metrics/MethodLength:
  76. Max: 30
  77. Metrics/PerceivedComplexity:
  78. Max: 13
  79. # Rubocop doesn't like method names in other languages but as Cucumber supports
  80. # languages, this cop needs to be disabled.
  81. Naming/AsciiIdentifiers:
  82. Enabled: false
  83. # For the most part, the project is solid on naming. There are though, a few
  84. # cases where the cop doesn't need to catch.
  85. Naming/MethodName:
  86. EnforcedStyle: snake_case
  87. Enabled: true
  88. Exclude:
  89. - 'examples/i18n/ar/lib/calculator.rb'
  90. - 'examples/i18n/he/lib/calculator.rb'
  91. - 'examples/i18n/he/lib/calculator.rb'
  92. - 'examples/i18n/tr/lib/hesap_makinesi.rb'
  93. - 'lib/cucumber/glue/dsl.rb'
  94. # In most cases, being descriptive with parameter names helps a reader understand
  95. # what the variable is for. In some cases, shorter names are sufficient.
  96. Naming/MethodParameterName:
  97. AllowedNames: _, e, n, v, id, io, gh, pr
  98. # Reviewed: these offenses look false as the variables are in cyrillic
  99. Naming/VariableName:
  100. Exclude:
  101. - 'examples/i18n/ru/features/step_definitions/calculator_steps.rb'
  102. - 'examples/i18n/uk/features/step_definitions/calculator_steps.rb'
  103. - 'examples/i18n/uz/features/step_definitions/calculator_steps.rb'
  104. # Rubocop doesn't handle some international words well for this cop
  105. Naming/VariableNumber:
  106. EnforcedStyle: normalcase
  107. Exclude:
  108. - 'examples/i18n/**/*'
  109. # This cop throws errors when parsing a lot of the repo's code, possibly due
  110. # to splat issues?
  111. Style/AccessModifierDeclarations:
  112. Enabled: false
  113. Style/ClassAndModuleChildren:
  114. Enabled: false
  115. Style/ClassEqualityComparison:
  116. Enabled: true
  117. Style/Documentation:
  118. Enabled: false
  119. Style/FormatStringToken:
  120. EnforcedStyle: annotated
  121. Style/FloatDivision:
  122. Enabled: false
  123. Style/StderrPuts:
  124. Enabled: false
  125. Style/RegexpLiteral:
  126. EnforcedStyle: slashes
  127. AllowInnerSlashes: true
  128. Style/YodaCondition:
  129. Enabled: true

No Description

Contributors (1)