1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
inherit_gem:
rubocop-shopify: rubocop.yml
plugins:
- rubocop-rake
- rubocop-minitest
require:
- rubocop-sorbet
- ./lib/rubocop/cop/ruby_lsp/use_language_server_aliases
- ./lib/rubocop/cop/ruby_lsp/use_register_with_handler_method
AllCops:
NewCops: disable
SuggestExtensions: false
Include:
- "sorbet/rbi/shims/**/*.rbi"
Exclude:
- "vendor/**/*"
- "vscode/**/*"
- "features/**/*"
- "test/fixtures/**/*"
- "test/expectations/**/*"
- "jekyll/**/*"
# This a vendored source file that is not a part of our codebase
- "lib/ruby_lsp/requests/support/package_url.rb"
Layout/LeadingCommentSpace:
AllowRBSInlineAnnotation: true
Layout/LineLength:
AllowedPatterns: ['\A\s*#:']
Minitest/AssertPredicate:
Enabled: true
Naming/FileName:
Exclude:
- "lib/ruby-lsp.rb"
RubyLsp/UseLanguageServerAliases:
Exclude:
- "test/**/*.rb"
Sorbet/FalseSigil:
Enabled: false
Sorbet/TrueSigil:
Enabled: true
Include:
- "test/**/*.rb"
- "lib/ruby_indexer/test/**/*.rb"
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
- "lib/ruby_lsp/scripts/compose_bundle.rb"
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
Exclude:
- "**/*.rake"
- "lib/**/*.rb"
Sorbet/StrictSigil:
Enabled: true
Include:
- "lib/**/*.rb"
Exclude:
- "**/*.rake"
- "test/**/*.rb"
- "lib/ruby_indexer/test/**/*.rb"
- "lib/ruby-lsp.rb"
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
- "lib/ruby_lsp/scripts/compose_bundle.rb"
- "lib/ruby_lsp/test_helper.rb"
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
Layout/ClassStructure:
Enabled: true
Exclude:
- "test/**/*"
ExpectedOrder:
- module_inclusion
- constants
- public_attribute_macros
- public_class_methods # does not recognize `class << self`
- initializer
- public_methods
- protected_attribute_macros
- protected_methods
- private_attribute_macros
- private_delegate
- private_methods
Categories:
attribute_macros:
- attr_accessor
- attr_reader
- attr_writer
module_inclusion:
- include
- prepend
- extend
|