F0*0*9 %:W0Y*9 %:W06 9 &:W0*9 %:WW0*0?W0*3$+;Xi{}'()*+,-*./  ~<<E  **9 :0*30EAA_ **9 :0*30CCg]} }**W00000*31FG23!DUUEEo-Mi**9 %:JKL00000000M0*3 4792453456:IIwY **9 %:OKL00000000P0*3 4792453456:!NN"!#!# **WSB7T*3*WUV0WV00*3&)+7899:,y$RR%&!&**9  ; <:Z0Y*W[IZW\IP*3/1=>??@2)'YY(((**0 *      * *0*0*!0*#0*(0*/ 0*0*-9:0*; 0*@ 0*B 0*D0*H0*&0*Q0*X0*3 O  QRSTUVWXYZ![#\%]'^)_+`-a/b1c3d5e7f9g;h=RAQEkGlImKlOkSp_yk}wABBBBBBCDBBBBBBBB)y2!4!45** +*3 5 i666** +*3 Q7777* +3 889997615q! = }9 #a&))[\]^_`abcdefghijklmNA<ICnopqrstuvYwxyz{|}~ERMEMX/home/vagrant/.rvm/gems/ruby-2.4.0@cmor/gems/rubocop-0.72.0/lib/rubocop/cop/generator.rbEM
EMEM EMEM # frozen_string_literal: true # TODO: when finished, run `rake generate_cops_documentation` to update the docs module RuboCop module Cop module %s # TODO: Write cop description and example of bad / good code. For every # `SupportedStyle` and unique configuration, there needs to be examples. # Examples must have valid Ruby syntax. Do not use upticks. # # @example EnforcedStyle: bar (default) # # Description of the `bar` style. # # # bad # bad_bar_method # # # bad # bad_bar_method(args) # # # good # good_bar_method # # # good # good_bar_method(args) # # @example EnforcedStyle: foo # # Description of the `foo` style. # # # bad # bad_foo_method # # # bad # bad_foo_method(args) # # # good # good_foo_method # # # good # good_foo_method(args) # class %s < Cop # TODO: Implement the cop in here. # # In many cases, you can use a node matcher for matching node pattern. # See https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/node_pattern.rb # # For example MSG = 'Use `#good_method` instead of `#bad_method`.'.freeze def_node_matcher :bad_method?, <<-PATTERN (send nil? :bad_method ...) PATTERN def on_send(node) return unless bad_method?(node) add_offense(node) end end end end end EM# frozen_string_literal: true EM EM=RSpec.describe RuboCop::Cop::%s::%s do EM0 subject(:cop) { described_class.new(config) } EM' let(:config) { RuboCop::Config.new } EM # TODO: Write test code EM # EM # For example EM8 it 'registers an offense when using `#bad_method`' do EM expect_offense(<<~RUBY) EM bad_method EM> ^^^^^^^^^^ Use `#good_method` instead of `#bad_method`. EM RUBY EM end EMA it 'does not register an offense when using `#good_method`' do EM expect_no_offenses(<<~RUBY) EM good_method EMend EMP[modify] A configuration for the cop is added into %s. EMS If you want to disable the cop by default, set `Enabled` option to false. MEM initializeEM-Specify a cop name with Department/Name styleM4M EM write_sourceM"EM write_specM$EMinject_requireEMlib/rubocop.rbMNMoM)EM inject_configEMconfig/default.ymlEMblock in inject_configMﲕMkMﲖM0EMtodoEM Do 3 steps: EMA 1. Add an entry to the "New features" section in CHANGELOG.md, EM e.g. "Add new `EM ` cop. ([@EM][])" EM 2. Modify the description of EM in config/default.yml EM3 3. Implement your new cop in the generated file! MiMgM<EMwrite_unless_file_existsEMrake new_cop: EM already exists!EM [create] MAEMgenerated_sourceMCEMgenerated_specMEEMgenerateMﲃMﲄMIEM spec_pathEMspecEMrubocopEMcopEM_spec.rbEM source_pathEMlibEM.rbMREM snake_caseEMRSpecEMrspecMﲗEM\1_\2MﲘMYEMbump_minor_versionEM.EMRuboCopEMCopEM GeneratorEMSOURCE_TEMPLATEEM SPEC_TEMPLATEEMCONFIGURATION_ADDED_MESSAGEEM$stdoutEMBadgeEM@badgeEM @github_userEM@outputEM ArgumentErrorEMoutputEMnameEM github_userEMparseEMbadgeEM qualified?EMraiseEMRequireFileInjectorEMroot_file_pathEMinjectEMnewEMConfigurationInjectorEMputsEMformatEMconfig_file_pathEMinjectorEMFileEM FileUtilsEMpathEMcontentsEMdirEMexist?EMwarnEMexit!EMdirnameEMmkdir_pEMwriteEMtemplateEM departmentEMcop_nameEMto_sEMjoinEMcamel_case_stringEM==EMgsubEMdowncaseEMVersionEMSTRINGEMversionsEMsplitEM[]EMsuccEM strip_indentEMcore#define_methodEMprivateEM attr_readerEMconfiguration_file_pathEM version_addedEM([^A-Z])([A-Z]+)EM([A-Z])([A-Z][^A-Z\d]+)=<I<<<<=8=aEEEE=FxFFFF.G^GGGG HaHHHH7IIII JJ!JAJMJkJwJJJJJJK&KPK\KhKtKKKK L5LSLmLLLMM*M6MbMMMMMMN#N/NKNWNcNoNNNNNNO(O?OKOiOOOOOOOP#P>PUPrPPPPQQ3QSQnQQQQQQR0RIRpRRRRRSSBS^SvSSSSSST)TDT_TxTTTTTT#U9UQUmUUUUUUV%VKVfVVVVV