forked from biemond/biemond-oradb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
75 lines (70 loc) · 2.86 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
require 'pathname'
require 'ci/reporter/rake/rspec'
require 'puppet_blacksmith/rake_tasks'
desc "Run the tests"
RSpec::Core::RakeTask.new(:test) do |t|
t.rspec_opts = ['--color', '-f d']
t.pattern = 'spec/*/*_spec.rb'
end
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send("disable_140chars")
PuppetLint.configuration.send('disable_variable_is_lowercase')
# PuppetLint.configuration.send("disable_right_to_left_relationship")
#PuppetLint.configuration.send("disable_autoloader_layout")
# PuppetLint.configuration.send("disable_names_containing_dash")
#PuppetLint.configuration.send("disable_class_inherits_from_params_class")
# PuppetLint.configuration.send("disable_parameter_order")
# PuppetLint.configuration.send("disable_inherits_across_namespaces")
# PuppetLint.configuration.send("disable_nested_classes_or_defines")
#PuppetLint.configuration.send("disable_variable_scope")
# PuppetLint.configuration.send("disable_slash_comments")
# PuppetLint.configuration.send("disable_star_comments")
# PuppetLint.configuration.send("disable_selector_inside_resource")
PuppetLint.configuration.send("disable_case_without_default")
# PuppetLint.configuration.send("disable_documentation")
# PuppetLint.configuration.send("disable_double_quoted_strings")
# PuppetLint.configuration.send("disable_only_variable_string")
# PuppetLint.configuration.send("disable_variables_not_enclosed")
# PuppetLint.configuration.send("disable_single_quote_string_with_variables")
# PuppetLint.configuration.send("disable_quoted_booleans")
# --no-puppet_url_without_modules
# PuppetLint.configuration.send("disable_variable_contains_dash")
# PuppetLint.configuration.send("disable_hard_tabs")
# PuppetLint.configuration.send("disable_trailing_whitespace")
# PuppetLint.configuration.send("disable_2sp_soft_tabs")
# PuppetLint.configuration.send("disable_arrow_alignment")
# PuppetLint.configuration.send("disable_unquoted_resource_title")
# PuppetLint.configuration.send("disable_ensure_first_param")
# PuppetLint.configuration.send("disable_duplicate_params")
# PuppetLint.configuration.send("disable_unquoted_file_mode")
# PuppetLint.configuration.send("disable_file_mode")
# PuppetLint.configuration.send("disable_ensure_not_symlink_target")
# --no-unquoted_node_name
exclude_paths = [
"pkg/**/*",
"vendor/**/*",
"spec/**/*",
]
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths
desc "Run syntax, lint, and spec tests."
task :default => [
:spec_prep,
:syntax,
:test,
:lint,
:spec_clean
]
begin
require 'rubocop/rake_task'
desc 'Run RuboCop on the lib directory'
Rubocop::RakeTask.new(:rubocop) do |task|
task.patterns = ['lib/**/*.rb']
task.fail_on_error = true
end
rescue LoadError, NameError
end