immosquare-cleaner 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +15 -1
- data/linters/rubocop-3.2.2.yml +85 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b2156d92e5a84a04d51921eddd6f7a5064f90cdb73d9bb6ebf30ac8ea0613f2
|
4
|
+
data.tar.gz: 89df7a2670096d0b3b3247dae66ec90715e4a03698dd4307676663a4a61906b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee0041dd8cf9c544568721bea210ad47746e4b74fb752c03f9e27f13a9db1521166e8ec6a2dbcb255e7b60b666695f7ed30b6fb098f822eb06cbec9b73f73882
|
7
|
+
data.tar.gz: 589966b8aa6f1d1f2cab314429498d80d5d06e7b123b0dbf0631fda972ca1de2032851117f4e318e22b9f3bc7f919bb07fc8eb2032b941e464602569c4fde989
|
data/lib/immosquare-cleaner.rb
CHANGED
@@ -54,9 +54,23 @@ module ImmosquareCleaner
|
|
54
54
|
|
55
55
|
##============================================================##
|
56
56
|
## Ruby Files
|
57
|
+
## We create a rubocop config file with the ruby version
|
58
|
+
## if it does not exist...Normally rubocop does it alone
|
59
|
+
## of this based on .ruby-version file but it doesn't work
|
60
|
+
## in our case where rubocop is in a gem which is called
|
61
|
+
## in a project...
|
57
62
|
##============================================================##
|
58
63
|
if file_path.end_with?(*RUBY_FILES) || File.open(file_path, &:gets)&.include?(SHEBANG)
|
59
|
-
|
64
|
+
rubocop_config_with_version_path = "#{gem_root}/linters/rubocop-#{RUBY_VERSION}.yml"
|
65
|
+
|
66
|
+
if !File.exist?(rubocop_config_with_version_path)
|
67
|
+
rubocop_config = YAML.load_file("#{gem_root}/linters/rubocop.yml")
|
68
|
+
rubocop_config["AllCops"] ||= {}
|
69
|
+
rubocop_config["AllCops"]["TargetRubyVersion"] = RUBY_VERSION
|
70
|
+
File.write(rubocop_config_with_version_path, rubocop_config.to_yaml)
|
71
|
+
end
|
72
|
+
|
73
|
+
cmds = ["bundle exec rubocop -c #{rubocop_config_with_version_path} #{file_path} #{ImmosquareCleaner.configuration.rubocop_options || "--autocorrect-all"}"]
|
60
74
|
launch_cmds(cmds)
|
61
75
|
normalize_last_line(file_path)
|
62
76
|
return
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
NewCops: enable
|
4
|
+
EnabledByDefault: false
|
5
|
+
UseCache: true
|
6
|
+
SuggestExtensions: false
|
7
|
+
TargetRubyVersion: 3.2.2
|
8
|
+
Metrics:
|
9
|
+
Enabled: false
|
10
|
+
Lint/UselessAssignment:
|
11
|
+
Enabled: false
|
12
|
+
Lint/RescueException:
|
13
|
+
Enabled: false
|
14
|
+
Lint/UnusedMethodArgument:
|
15
|
+
Enabled: false
|
16
|
+
Naming/VariableNumber:
|
17
|
+
Enabled: false
|
18
|
+
Naming/FileName:
|
19
|
+
Enabled: false
|
20
|
+
Layout/LeadingEmptyLines:
|
21
|
+
Enabled: false
|
22
|
+
Layout/InitialIndentation:
|
23
|
+
Enabled: false
|
24
|
+
Layout/TrailingEmptyLines:
|
25
|
+
Enabled: false
|
26
|
+
Layout/ExtraSpacing:
|
27
|
+
Enabled: false
|
28
|
+
Layout/LineLength:
|
29
|
+
Enabled: false
|
30
|
+
Layout/TrailingWhitespace:
|
31
|
+
Enabled: true
|
32
|
+
Layout/EmptyLines:
|
33
|
+
Enabled: false
|
34
|
+
Layout/SpaceInsideBlockBraces:
|
35
|
+
SpaceBeforeBlockParameters: false
|
36
|
+
Layout/EmptyLinesAroundClassBody:
|
37
|
+
EnforcedStyle: empty_lines
|
38
|
+
Layout/FirstHashElementIndentation:
|
39
|
+
EnforcedStyle: consistent
|
40
|
+
Layout/ArgumentAlignment:
|
41
|
+
EnforcedStyle: with_fixed_indentation
|
42
|
+
Layout/HashAlignment:
|
43
|
+
EnforcedHashRocketStyle: table
|
44
|
+
Layout/MultilineAssignmentLayout:
|
45
|
+
EnforcedStyle: same_line
|
46
|
+
Layout/SpaceInsideHashLiteralBraces:
|
47
|
+
EnforcedStyle: no_space
|
48
|
+
Layout/MultilineMethodCallIndentation:
|
49
|
+
EnforcedStyle: indented
|
50
|
+
Style/RedundantBegin:
|
51
|
+
Enabled: false
|
52
|
+
Style/MultilineTernaryOperator:
|
53
|
+
Enabled: false
|
54
|
+
Style/NestedTernaryOperator:
|
55
|
+
Enabled: false
|
56
|
+
Style/MultilineIfModifier:
|
57
|
+
Enabled: false
|
58
|
+
Style/FrozenStringLiteralComment:
|
59
|
+
Enabled: false
|
60
|
+
Style/Next:
|
61
|
+
Enabled: false
|
62
|
+
Style/Documentation:
|
63
|
+
Enabled: false
|
64
|
+
Style/IfUnlessModifierOfIfUnless:
|
65
|
+
Enabled: false
|
66
|
+
Style/NegatedIf:
|
67
|
+
Enabled: false
|
68
|
+
Style/MethodCallWithArgsParentheses:
|
69
|
+
Enabled: true
|
70
|
+
Style/FormatStringToken:
|
71
|
+
EnforcedStyle: template
|
72
|
+
Style/NumericPredicate:
|
73
|
+
EnforcedStyle: comparison
|
74
|
+
Style/StringLiterals:
|
75
|
+
EnforcedStyle: double_quotes
|
76
|
+
Style/StringLiteralsInInterpolation:
|
77
|
+
EnforcedStyle: double_quotes
|
78
|
+
Style/HashSyntax:
|
79
|
+
EnforcedStyle: hash_rockets
|
80
|
+
Style/WordArray:
|
81
|
+
EnforcedStyle: brackets
|
82
|
+
Style/SymbolArray:
|
83
|
+
EnforcedStyle: brackets
|
84
|
+
Gemspec/RequireMFA:
|
85
|
+
Enabled: false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immosquare-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IMMO SQUARE
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- linters/erb-lint.yml
|
119
119
|
- linters/eslintrc.json
|
120
120
|
- linters/prettier.yml
|
121
|
+
- linters/rubocop-3.2.2.yml
|
121
122
|
- linters/rubocop.yml
|
122
123
|
- node_modules/.bin/acorn
|
123
124
|
- node_modules/.bin/eslint
|