How to tell Rubocop to ignore a specific directory or file

前端 未结 4 1472
盖世英雄少女心
盖世英雄少女心 2020-12-29 00:34

My project is extending open-source classes from a third-party gem that we don\'t want to hold to the same coding standards as our own code. Refactoring the gem code isn\'t

4条回答
  •  孤城傲影
    2020-12-29 01:34

    Can also consider comments for a single file. Great for ignoring the linter for a quick and dirty temporary task.

    # rubocop:disable all
    
    module TempTask
      ...
    end
    
    # rubocop:enable all
    

提交回复
热议问题