Sha256: f80de53abdf861def2af2bcde10eeb178d7ca4fcaa2d96ad9476fff8b75ecb33

Contents?: true

Size: 1.54 KB

Versions: 8

Compression:

Stored size: 1.54 KB

Contents

require 'rake_factory'
require 'ruby_leiningen'
require 'ruby_leiningen/plugins'

require_relative '../mixins/directoried'

module RakeLeiningen
  module Tasks
    class Pedantise < RakeFactory::Task
      include Mixins::Directoried

      default_name :pedantise
      default_description "Hunt for 'bad' code in all clojure files."
      default_prerequisites ->(t) {
        t.ensure_task_name ? [t.ensure_task_name] : []
      }

      parameter :show_help
      parameter :verbose
      parameter :maximum_line_length
      parameter :long_lines
      parameter :trailing_whitespace
      parameter :trailing_blank_lines
      parameter :var_redefs
      parameter :docstrings
      parameter :name_collisions
      parameter :exclude_profiles
      parameter :profile

      parameter :directory, default: '.'

      parameter :ensure_task_name, default: 'leiningen:ensure'

      action do |t|
        puts "Looking for 'bad' code in all clojure files..."

        in_directory(t.directory) do
          RubyLeiningen.bikeshed(
              show_help: t.show_help,
              verbose: t.verbose,
              maximum_line_length: t.maximum_line_length,
              long_lines: t.long_lines,
              trailing_whitespace: t.trailing_whitespace,
              trailing_blank_lines: t.trailing_blank_lines,
              var_redefs: t.var_redefs,
              docstrings: t.docstrings,
              name_collisions: t.name_collisions,
              exclude_profiles: t.exclude_profiles,
              profile: t.profile)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rake_leiningen-0.12.0 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.11.0.pre.1 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.10.0 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.9.0.pre.1 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.8.0 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.7.0.pre.1 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.6.0 lib/rake_leiningen/tasks/pedantise.rb
rake_leiningen-0.5.0.pre.1 lib/rake_leiningen/tasks/pedantise.rb