pdk-rubocop 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/pdk/rubocop/rake.rb +9 -0
- data/lib/pdk/rubocop/version.rb +7 -0
- data/lib/pdk/rubocop.rb +3 -0
- data/rubocop.yml +86 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e577835947cb333d8d4b0070378fd8fb75262cd7313820d9e8353c1a46a57dcb
|
4
|
+
data.tar.gz: 7751248c35dbcb03eba37dfe5a4ffbb76e71824a5f0c729afe10b48025b08562
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 254db1a4faee5984a27112768c2b986bc5ceae7f12549692e1082d2632418b5603a86fdf746784bc60d1f36dbc1c63d55ff50954e4062a73fdf3907751f508ea
|
7
|
+
data.tar.gz: a616d59a72cbc52c870bd6fa7008cb10cb9e9743a0a591f44f80b1e9f6ba7613ce03ccf1ca1bb26d9ac05c015065258f9dc75c360050014010022942d6688182
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
5
|
+
# These make the rubocop experience maybe slightly less terrible
|
6
|
+
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
|
7
|
+
# Use Rubocop's Github Actions formatter if possible
|
8
|
+
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
|
9
|
+
end
|
data/lib/pdk/rubocop.rb
ADDED
data/rubocop.yml
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
require:
|
3
|
+
- rubocop-performance
|
4
|
+
- rubocop-rspec
|
5
|
+
AllCops:
|
6
|
+
NewCops: enable
|
7
|
+
DisplayCopNames: true
|
8
|
+
ExtraDetails: true
|
9
|
+
DisplayStyleGuide: true
|
10
|
+
TargetRubyVersion: '2.6'
|
11
|
+
Include:
|
12
|
+
- "**/*.rb"
|
13
|
+
Exclude:
|
14
|
+
- bin/*
|
15
|
+
- ".vendor/**/*"
|
16
|
+
- pkg/**/*
|
17
|
+
- spec/fixtures/**/*
|
18
|
+
- vendor/**/*
|
19
|
+
- "**/Puppetfile"
|
20
|
+
- "**/Vagrantfile"
|
21
|
+
- "**/Guardfile"
|
22
|
+
Layout/LineLength:
|
23
|
+
Description: People have wide screens, use them.
|
24
|
+
Max: 200
|
25
|
+
RSpec/BeforeAfterAll:
|
26
|
+
Description: Beware of using after(:all) as it may cause state to leak between tests.
|
27
|
+
A necessary evil in acceptance testing.
|
28
|
+
Exclude:
|
29
|
+
- spec/acceptance/**/*.rb
|
30
|
+
RSpec/HookArgument:
|
31
|
+
Description: Prefer explicit :each argument, matching existing module's style
|
32
|
+
EnforcedStyle: each
|
33
|
+
RSpec/DescribeSymbol:
|
34
|
+
Exclude:
|
35
|
+
- spec/unit/facter/**/*.rb
|
36
|
+
Style/BlockDelimiters:
|
37
|
+
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
|
38
|
+
be consistent then.
|
39
|
+
EnforcedStyle: braces_for_chaining
|
40
|
+
Style/ClassAndModuleChildren:
|
41
|
+
Description: Compact style reduces the required amount of indentation.
|
42
|
+
EnforcedStyle: compact
|
43
|
+
Style/EmptyElse:
|
44
|
+
Description: Enforce against empty else clauses, but allow `nil` for clarity.
|
45
|
+
EnforcedStyle: empty
|
46
|
+
Style/FormatString:
|
47
|
+
Description: Following the main puppet project's style, prefer the % format format.
|
48
|
+
EnforcedStyle: percent
|
49
|
+
Style/FormatStringToken:
|
50
|
+
Description: Following the main puppet project's style, prefer the simpler template
|
51
|
+
tokens over annotated ones.
|
52
|
+
EnforcedStyle: template
|
53
|
+
Style/Lambda:
|
54
|
+
Description: Prefer the keyword for easier discoverability.
|
55
|
+
EnforcedStyle: literal
|
56
|
+
Style/RegexpLiteral:
|
57
|
+
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
|
58
|
+
EnforcedStyle: percent_r
|
59
|
+
Style/TernaryParentheses:
|
60
|
+
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
|
61
|
+
on complex expressions for better readability, but seriously consider breaking
|
62
|
+
it up.
|
63
|
+
EnforcedStyle: require_parentheses_when_complex
|
64
|
+
Style/TrailingCommaInArguments:
|
65
|
+
Description: Prefer always trailing comma on multiline argument lists. This makes
|
66
|
+
diffs, and re-ordering nicer.
|
67
|
+
EnforcedStyleForMultiline: comma
|
68
|
+
Style/TrailingCommaInArrayLiteral:
|
69
|
+
Description: Prefer always trailing comma on multiline literals. This makes diffs,
|
70
|
+
and re-ordering nicer.
|
71
|
+
EnforcedStyleForMultiline: comma
|
72
|
+
Style/SymbolArray:
|
73
|
+
Description: Using percent style obscures symbolic intent of array's contents.
|
74
|
+
EnforcedStyle: brackets
|
75
|
+
RSpec/MessageSpies:
|
76
|
+
EnforcedStyle: receive
|
77
|
+
Style/Documentation:
|
78
|
+
Exclude:
|
79
|
+
- lib/puppet/parser/functions/**/*
|
80
|
+
- spec/**/*
|
81
|
+
Style/WordArray:
|
82
|
+
EnforcedStyle: brackets
|
83
|
+
RSpec/MultipleExpectations:
|
84
|
+
Max: 3
|
85
|
+
Naming/MethodParameterName:
|
86
|
+
AllowedNames: 'is'
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pdk-rubocop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Puppet, Inc
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.48.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.48.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-performance
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.16.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.16.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.19.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.19.0
|
69
|
+
description: A Gem that provides Rubocop configuration to Puppet Modules and Tools.
|
70
|
+
email:
|
71
|
+
- info@puppet.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/pdk/rubocop.rb
|
77
|
+
- lib/pdk/rubocop/rake.rb
|
78
|
+
- lib/pdk/rubocop/version.rb
|
79
|
+
- rubocop.yml
|
80
|
+
homepage: https://github.com/puppetlabs/pdk-rubocop
|
81
|
+
licenses:
|
82
|
+
- Apache-2.0
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 2.7.0
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubygems_version: 3.1.6
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: A Gem that provides RuboCop configuration to Puppet Modules and Tools.
|
103
|
+
test_files: []
|