VIM Rubocop Ruby在每行代码后重复提示/注解

41ik7eoe  于 2023-05-06  发布在  Ruby
关注(0)|答案(1)|浏览(169)

它是每个文件中存在rubocop问题的每一行之后的默认rubocop注解。在过去的三个月里,我一直有这样的行为,不知道如何避免这样的评论。(请看上面的图片)在我的.vimrv文件中,我有plagin

ngmy/vim-rubocop

和耦合方向

let g:vimrubocop_config = '/path/to/rubocop.yml'
let g:syntastic_ruby_checkers = ['rubocop']

rubocop.yml

#require: rubocop-rspec

AllCops:
  TargetRubyVersion: 2.6

  # additional excludes for Rails
  Exclude:
    - 'db/migrate/**/*'
    - 'db/schema.rb'
    - 'db/seeds.rb'
    - 'db/migrate/*'
    - 'config/**/*'
    - 'bin/**/*'
    - 'log'
    - 'public/**/*'
    - 'tmp/**/*'
    - 'vendor/**/*'

Lint/RaiseException:
  Enabled: true

Lint/StructNewOverride:
  Enabled: true

Style/HashEachMethods:
  Enabled: true

Style/HashTransformKeys:
  Enabled: true

Style/HashTransformValues:
  Enabled: true

Layout/LineLength:
  Max: 120
  IgnoredPatterns: ['\A#']

Metrics/MethodLength:
  Max: 20

Metrics/AbcSize:
  Max: 15

Metrics/ClassLength:
  Max: 120

Metrics/BlockLength:
  Max: 30

Layout/SpaceInLambdaLiteral:
  EnforcedStyle: require_space

Style/StringLiterals:
  EnforcedStyle: double_quotes

Style/Documentation:
  Enabled: false

如何避免这些评论?坦克很多
我试着修改我的vimrc,注解所有与rubocop设置相关的方向

相关问题