def rubocop
      begin
        require 'rubocop/rake_task'
      rescue LoadError
        nil # Might be in a group that is not installed
      end
      desc 'Run RuboCop on the tasks and lib directory'
      ::RuboCop::RakeTask.new(:rubocop) do |task|
        task.patterns = file_list
        task.options  = ['--display-cop-names', '--extra-details']
      end
    end
def rubocop
      begin
        require 'rubocop/rake_task'
      rescue LoadError
        nil # Might be in a group that is not installed
      end
      desc 'Run RuboCop on the tasks and lib directory'
      ::RuboCop::RakeTask.new(:rubocop) do |task|
        task.patterns = file_list
        task.options  = ['--display-cop-names', '--extra-details']
      end
    end
RuboCop