immosquare-cleaner 0.1.52 → 0.1.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/immosquare-cleaner +24 -24
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +9 -9
- data/linters/rubocop/cop/custom_cops/pre/comment_normalization.rb +122 -0
- data/linters/rubocop/cop/custom_cops/style/use_credentials_instead_of_env.rb +40 -0
- data/linters/rubocop-3.3.6.yml +11 -4
- data/linters/rubocop.yml +15 -5
- metadata +50 -40
- data/linters/rubocop-3.3.4.yml +0 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af665f762e14a1bdcd0e70e34ce6d520db0acf3c4adffc8a418877fcffede1c4
|
4
|
+
data.tar.gz: 7e8b7dfff3619c6a314b22f0a09959acec888e63d049a6c9dff311f495c2117a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc51d6c15c4451af904583f070738e09e81e56c0e5c168a6d28cd7af0a936dfa4f223752b689a9884524762b785f14ce2757fd2f12956c1b4ef8236736e2393
|
7
|
+
data.tar.gz: 63225554da9fbc25c57480eee2f393eb784b1da35e8eaeb3c7eb2f7d898c2c607d5cad1b4ed204ff3683f921df9e17d22b2decb8f7b87406c5a98d3739efa351
|
data/bin/immosquare-cleaner
CHANGED
@@ -4,9 +4,9 @@ require "immosquare-cleaner"
|
|
4
4
|
require "optparse"
|
5
5
|
|
6
6
|
|
7
|
-
|
7
|
+
##============================================================##
|
8
8
|
## We check if bun.sh is installed
|
9
|
-
|
9
|
+
##============================================================##
|
10
10
|
def bun_installed?
|
11
11
|
system("which bun > /dev/null 2>&1")
|
12
12
|
end
|
@@ -18,49 +18,49 @@ end
|
|
18
18
|
|
19
19
|
|
20
20
|
options = {}
|
21
|
-
|
22
|
-
## optparse is a standard library of ruby, it's used to parse command line
|
23
|
-
|
21
|
+
##============================================================##
|
22
|
+
## optparse is a standard library of ruby, it's used to parse command line
|
23
|
+
##============================================================##
|
24
24
|
OptionParser.new do |opts|
|
25
25
|
opts.banner = "Usage: immosquare-cleaner [options] file"
|
26
26
|
|
27
|
-
|
28
|
-
## Capture all single-letter options (like '-t', '-a', etc.)
|
29
|
-
|
27
|
+
##============================================================##
|
28
|
+
## Capture all single-letter options (like '-t', '-a', etc.)
|
29
|
+
##============================================================##
|
30
30
|
("a".."z").each do |letter|
|
31
31
|
opts.on("-#{letter} [OPTION]", "Option -#{letter}") do |value|
|
32
32
|
options[letter.to_sym] = value
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
## If you also want to capture longer options, add them here
|
38
|
-
## Example:
|
39
|
-
## opts.on("--tag TAG", "Tag option") do |t|
|
40
|
-
## options[:tag] = t
|
41
|
-
## end
|
42
|
-
|
36
|
+
##============================================================##
|
37
|
+
## If you also want to capture longer options, add them here
|
38
|
+
## Example:
|
39
|
+
## opts.on("--tag TAG", "Tag option") do |t|
|
40
|
+
## options[:tag] = t
|
41
|
+
## end
|
42
|
+
##============================================================##
|
43
43
|
end.parse!
|
44
44
|
|
45
|
-
|
46
|
-
## Check if the file path is provided
|
47
|
-
|
45
|
+
##============================================================##
|
46
|
+
## Check if the file path is provided
|
47
|
+
##============================================================##
|
48
48
|
file_path = ARGV[0]
|
49
49
|
if !file_path
|
50
50
|
puts("Error: Please provide a file path.")
|
51
51
|
exit 1
|
52
52
|
end
|
53
53
|
|
54
|
-
|
55
|
-
## Check if the file exists
|
56
|
-
|
54
|
+
##============================================================##
|
55
|
+
## Check if the file exists
|
56
|
+
##============================================================##
|
57
57
|
if !File.exist?(file_path)
|
58
58
|
puts("Error: The file '#{file_path}' does not exist.")
|
59
59
|
exit 1
|
60
60
|
end
|
61
61
|
|
62
62
|
|
63
|
-
|
64
|
-
## We can now call the clean method, passing the file path and options
|
65
|
-
|
63
|
+
##============================================================##
|
64
|
+
## We can now call the clean method, passing the file path and options
|
65
|
+
##============================================================##
|
66
66
|
ImmosquareCleaner.clean(file_path, **options)
|
data/lib/immosquare-cleaner.rb
CHANGED
@@ -7,24 +7,24 @@ require_relative "immosquare-cleaner/configuration"
|
|
7
7
|
require_relative "immosquare-cleaner/markdown"
|
8
8
|
require_relative "immosquare-cleaner/railtie" if defined?(Rails)
|
9
9
|
|
10
|
-
|
10
|
+
##============================================================##
|
11
11
|
## Importing the 'English' library allows us to use more human-readable
|
12
12
|
## global variables, such as $INPUT_RECORD_SEPARATOR instead of $/,
|
13
13
|
## which enhances code clarity and makes it easier to understand
|
14
14
|
## the purpose of these variables in our code.
|
15
|
-
|
15
|
+
##============================================================##
|
16
16
|
module ImmosquareCleaner
|
17
17
|
class << self
|
18
18
|
|
19
|
-
|
19
|
+
##============================================================##
|
20
20
|
## Constants
|
21
|
-
|
21
|
+
##============================================================##
|
22
22
|
SHEBANG = "#!/usr/bin/env ruby".freeze
|
23
23
|
RUBY_FILES = [".rb", ".rake", "Gemfile", "Rakefile", ".axlsx", ".gemspec", ".ru", ".podspec", ".jbuilder", ".rabl", ".thor", "config.ru", "Berksfile", "Capfile", "Guardfile", "Podfile", "Thorfile", "Vagrantfile"].freeze
|
24
24
|
|
25
|
-
|
25
|
+
##============================================================##
|
26
26
|
## Gem configuration
|
27
|
-
|
27
|
+
##============================================================##
|
28
28
|
attr_writer :configuration
|
29
29
|
|
30
30
|
def configuration
|
@@ -72,7 +72,7 @@ module ImmosquareCleaner
|
|
72
72
|
File.write(rubocop_config_with_version_path, rubocop_config.to_yaml)
|
73
73
|
end
|
74
74
|
|
75
|
-
cmds = ["bundle exec rubocop -c #{rubocop_config_with_version_path} #{file_path} #{ImmosquareCleaner.configuration.rubocop_options || "--autocorrect-all"}"]
|
75
|
+
cmds = ["bundle exec rubocop -c #{rubocop_config_with_version_path} \"#{file_path}\" #{ImmosquareCleaner.configuration.rubocop_options || "--autocorrect-all"}"]
|
76
76
|
launch_cmds(cmds)
|
77
77
|
File.normalize_last_line(file_path)
|
78
78
|
return
|
@@ -157,10 +157,10 @@ module ImmosquareCleaner
|
|
157
157
|
File.expand_path("..", __dir__)
|
158
158
|
end
|
159
159
|
|
160
|
-
|
160
|
+
##============================================================##
|
161
161
|
## We change the current directory to the gem root to ensure the gem's paths
|
162
162
|
## are used when executing the commands
|
163
|
-
|
163
|
+
##============================================================##
|
164
164
|
def launch_cmds(cmds)
|
165
165
|
Dir.chdir(gem_root) do
|
166
166
|
cmds.each {|cmd| system(cmd) }
|
@@ -0,0 +1,122 @@
|
|
1
|
+
module RuboCop
|
2
|
+
module Cop
|
3
|
+
module CustomCops
|
4
|
+
##============================================================##
|
5
|
+
## Ce cop dépend du module PRE pour être lancer top dans le
|
6
|
+
## processus de vérification pour que ensuite Layout/CommentIndentation
|
7
|
+
## intende correctement les commentaires modifiés.
|
8
|
+
## Department Layout (y compris Layout/CommentIndentation)
|
9
|
+
## Department Lint
|
10
|
+
## Department Style
|
11
|
+
## Department Metricstoto
|
12
|
+
##============================================================##
|
13
|
+
module Pre
|
14
|
+
class CommentNormalization < Base
|
15
|
+
|
16
|
+
extend AutoCorrector
|
17
|
+
|
18
|
+
MSG = "Comments should be normalized with the standard format if start with ##".freeze
|
19
|
+
BORDER_LINE = "###{"=" * 60}##".freeze
|
20
|
+
|
21
|
+
##============================================================##
|
22
|
+
## 1 - var js, fjs = d.getElementsByTagName(s)[0];
|
23
|
+
## équivaut à var js = null et var fjs(first JS) d.getElementsByTagName(s)[0]
|
24
|
+
## On compile le fichier avec Terser pour qu'il soit minifié
|
25
|
+
##============================================================##
|
26
|
+
def on_new_investigation
|
27
|
+
comment_blocks = find_comment_blocks(processed_source.comments)
|
28
|
+
|
29
|
+
comment_blocks.each do |block|
|
30
|
+
add_offense(block.first) do |corrector|
|
31
|
+
corrector.replace(range_for_block(block), normalize_comment_block(block))
|
32
|
+
end if needs_correction?(block)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
|
39
|
+
##============================================================##
|
40
|
+
## On ne veut traiter que les commentaires qui :
|
41
|
+
## - commencent par ## (et non #)
|
42
|
+
## - ne sont pas des commentaires de fin de ligne ruby
|
43
|
+
##============================================================##
|
44
|
+
def find_comment_blocks(comments)
|
45
|
+
blocks = []
|
46
|
+
current_block = []
|
47
|
+
filtered_comments = comments.select {|comment| current_line(comment).strip.start_with?("##") }
|
48
|
+
|
49
|
+
filtered_comments.each do |comment|
|
50
|
+
if current_block.empty? || consecutive_comments?(current_block.last, comment)
|
51
|
+
current_block << comment
|
52
|
+
else
|
53
|
+
blocks << current_block unless current_block.empty?
|
54
|
+
current_block = [comment]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
blocks << current_block unless current_block.empty?
|
59
|
+
blocks
|
60
|
+
end
|
61
|
+
|
62
|
+
##============================================================##
|
63
|
+
## Pour récupérer le contenu de la ligne courante
|
64
|
+
##============================================================##
|
65
|
+
def current_line(comment)
|
66
|
+
processed_source.lines[comment.location.line - 1]
|
67
|
+
end
|
68
|
+
|
69
|
+
def consecutive_comments?(previous_comment, current_comment)
|
70
|
+
return false unless previous_comment && current_comment
|
71
|
+
|
72
|
+
previous_line = previous_comment.location.line
|
73
|
+
current_line = current_comment.location.line
|
74
|
+
current_line == previous_line + 1
|
75
|
+
end
|
76
|
+
|
77
|
+
def needs_correction?(block)
|
78
|
+
indent = indentation(block.first)
|
79
|
+
expected_border = "#{indent}#{BORDER_LINE}"
|
80
|
+
|
81
|
+
return false if block.first.text == expected_border &&
|
82
|
+
block.last.text == expected_border &&
|
83
|
+
block.all? {|comment| comment.text.start_with?("#{indent}## ") || comment.text == expected_border }
|
84
|
+
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
def normalize_comment_block(block)
|
89
|
+
indent = indentation(block.first)
|
90
|
+
normalized_lines = []
|
91
|
+
|
92
|
+
normalized_lines << "#{indent}#{BORDER_LINE}"
|
93
|
+
|
94
|
+
block.each do |comment|
|
95
|
+
text = comment.text.to_s.strip
|
96
|
+
next if text.start_with?("##=")
|
97
|
+
|
98
|
+
text = "## #{text}" if !text.start_with?("## ")
|
99
|
+
text = text.chomp("##").strip
|
100
|
+
normalized_lines << "#{indent}#{text}"
|
101
|
+
end
|
102
|
+
|
103
|
+
normalized_lines << "#{indent}#{BORDER_LINE}"
|
104
|
+
normalized_lines.join("\n")
|
105
|
+
end
|
106
|
+
|
107
|
+
def indentation(comment)
|
108
|
+
comment.text.match(/^\s*/)[0]
|
109
|
+
end
|
110
|
+
|
111
|
+
def range_for_block(block)
|
112
|
+
start_pos = block.first.location.expression.begin_pos
|
113
|
+
end_pos = block.last.location.expression.end_pos
|
114
|
+
|
115
|
+
Parser::Source::Range.new(processed_source.buffer, start_pos, end_pos)
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module RuboCop
|
2
|
+
module Cop
|
3
|
+
module CustomCops
|
4
|
+
module Style
|
5
|
+
##============================================================##
|
6
|
+
## Custom Cop: UseCredentialsInsteadOfEnv
|
7
|
+
## To replace ENV.fetch with Rails.application.credentials
|
8
|
+
##============================================================##
|
9
|
+
class UseCredentialsInsteadOfEnv < Base
|
10
|
+
|
11
|
+
extend AutoCorrector
|
12
|
+
|
13
|
+
MSG = "Use Rails.application.credentials instead of ENV.fetch".freeze
|
14
|
+
|
15
|
+
##============================================================##
|
16
|
+
## Node Matcher
|
17
|
+
##============================================================##
|
18
|
+
def_node_matcher :env_fetch?, <<~PATTERN
|
19
|
+
(send (const nil? :ENV) :fetch ...)
|
20
|
+
PATTERN
|
21
|
+
|
22
|
+
def on_send(node)
|
23
|
+
return if !env_fetch?(node)
|
24
|
+
|
25
|
+
##============================================================##
|
26
|
+
## ENV.fetch("hello_world", nil) => Rails.application.credentials.hello_world
|
27
|
+
## ENV.fetch("hello_world_#{user_id}", nil) => Rails.application.credentials["hello_world_#{user_id}"]
|
28
|
+
##============================================================##
|
29
|
+
add_offense(node) do |corrector|
|
30
|
+
key = node.arguments.first
|
31
|
+
value = key.type == :dstr ? "[#{key.source}]" : ".#{key.source.delete('"')}"
|
32
|
+
corrector.replace(node, "Rails.application.credentials#{value}")
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/linters/rubocop-3.3.6.yml
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
---
|
2
|
-
require:
|
2
|
+
require:
|
3
|
+
- rubocop/cop/style/method_call_with_args_parentheses_override
|
4
|
+
- rubocop/cop/custom_cops/style/use_credentials_instead_of_env
|
5
|
+
- rubocop/cop/custom_cops/pre/comment_normalization
|
3
6
|
AllCops:
|
4
7
|
NewCops: enable
|
5
8
|
EnabledByDefault: false
|
@@ -19,7 +22,7 @@ Naming/VariableNumber:
|
|
19
22
|
Enabled: false
|
20
23
|
Naming/FileName:
|
21
24
|
Enabled: false
|
22
|
-
MethodParameterName:
|
25
|
+
Naming/MethodParameterName:
|
23
26
|
MinNameLength: 1
|
24
27
|
Layout/LeadingEmptyLines:
|
25
28
|
Enabled: false
|
@@ -73,8 +76,6 @@ Style/IfUnlessModifierOfIfUnless:
|
|
73
76
|
Enabled: false
|
74
77
|
Style/NegatedIf:
|
75
78
|
Enabled: false
|
76
|
-
Style/MethodCallWithArgsParentheses:
|
77
|
-
Enabled: true
|
78
79
|
Style/FormatStringToken:
|
79
80
|
EnforcedStyle: template
|
80
81
|
Style/NumericPredicate:
|
@@ -89,5 +90,11 @@ Style/WordArray:
|
|
89
90
|
EnforcedStyle: brackets
|
90
91
|
Style/SymbolArray:
|
91
92
|
EnforcedStyle: brackets
|
93
|
+
Style/MethodCallWithArgsParentheses:
|
94
|
+
Enabled: true
|
95
|
+
CustomCops/Style/UseCredentialsInsteadOfEnv:
|
96
|
+
Enabled: true
|
97
|
+
CustomCops/Pre/CommentNormalization:
|
98
|
+
Enabled: true
|
92
99
|
Gemspec/RequireMFA:
|
93
100
|
Enabled: false
|
data/linters/rubocop.yml
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop/cop/style/method_call_with_args_parentheses_override
|
3
|
+
- rubocop/cop/custom_cops/style/use_credentials_instead_of_env
|
4
|
+
- rubocop/cop/custom_cops/pre/comment_normalization
|
2
5
|
|
3
6
|
# Pour activer toutes les méthodes de Rubocop et activer le cache pour les gros fichiers
|
4
7
|
AllCops:
|
@@ -25,7 +28,7 @@ Naming/VariableNumber:
|
|
25
28
|
Enabled: false # On veut pouvour utiliser administrative_area_level_1 avec cette synthase
|
26
29
|
Naming/FileName:
|
27
30
|
Enabled: false # on veut pouvoir faire des nom de fichier avec des - immosquare-cleaner.rb
|
28
|
-
MethodParameterName:
|
31
|
+
Naming/MethodParameterName:
|
29
32
|
MinNameLength: 1 # On veut pouvoir utiliser des noms de paramètres de 1 caractère
|
30
33
|
|
31
34
|
#################### Layout ###########################
|
@@ -84,11 +87,8 @@ Style/IfUnlessModifierOfIfUnless:
|
|
84
87
|
Enabled: false # On veut pourvoir mettre un if à la fin de end
|
85
88
|
Style/NegatedIf:
|
86
89
|
Enabled: false # On veut remplacer les if ! par des unless
|
87
|
-
Style/MethodCallWithArgsParentheses:
|
88
|
-
Enabled: true # On veut forcer les parenthèses où elles sont utilises pour rendre le code plus propre
|
89
90
|
Style/FormatStringToken:
|
90
91
|
EnforcedStyle: "template" ## On veut les interpolation avec le format %{my_string} et avec avec %<my_string>s
|
91
|
-
|
92
92
|
Style/NumericPredicate:
|
93
93
|
EnforcedStyle: comparison # On ne veut pas des .zero? .negative? .positif?
|
94
94
|
Style/StringLiterals:
|
@@ -102,6 +102,16 @@ Style/WordArray:
|
|
102
102
|
Style/SymbolArray:
|
103
103
|
EnforcedStyle: brackets # Pour formater les arrays de la forme [:a, :b, :c] et pas %i[a b c]
|
104
104
|
|
105
|
+
#################### OVERWRITE ###########################
|
106
|
+
Style/MethodCallWithArgsParentheses:
|
107
|
+
Enabled: true # On veut forcer les parenthèses où elles sont utilises pour rendre le code plus propre
|
108
|
+
|
109
|
+
#################### CUSTOMS ###########################
|
110
|
+
CustomCops/Style/UseCredentialsInsteadOfEnv:
|
111
|
+
Enabled: true # On veut forcer l'utilisation de credentials au lieu de ENV pour les secrets
|
112
|
+
CustomCops/Pre/CommentNormalization:
|
113
|
+
Enabled: true # On veut forcer la normalisation des commentaires
|
114
|
+
|
105
115
|
#################### GEM ###########################
|
106
116
|
Gemspec/RequireMFA:
|
107
117
|
Enabled: false # On ne veut pas obliger le MFA pour pusher un gem
|
metadata
CHANGED
@@ -1,103 +1,114 @@
|
|
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.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- immosquare
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-
|
10
|
+
date: 2024-12-22 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: erb_lint
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.7'
|
19
|
+
- - "<="
|
18
20
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
21
|
+
version: '1000.0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
requirements:
|
24
|
-
- - "
|
26
|
+
- - ">="
|
25
27
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
28
|
+
version: '0.7'
|
29
|
+
- - "<="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: '1000.0'
|
27
32
|
- !ruby/object:Gem::Dependency
|
28
33
|
name: htmlbeautifier
|
29
34
|
requirement: !ruby/object:Gem::Requirement
|
30
35
|
requirements:
|
31
|
-
- - "
|
36
|
+
- - ">="
|
32
37
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1'
|
38
|
+
version: '1.4'
|
39
|
+
- - "<="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1000.0'
|
34
42
|
type: :runtime
|
35
43
|
prerelease: false
|
36
44
|
version_requirements: !ruby/object:Gem::Requirement
|
37
45
|
requirements:
|
38
|
-
- - "
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.4'
|
49
|
+
- - "<="
|
39
50
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
51
|
+
version: '1000.0'
|
41
52
|
- !ruby/object:Gem::Dependency
|
42
53
|
name: immosquare-extensions
|
43
54
|
requirement: !ruby/object:Gem::Requirement
|
44
55
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
56
|
- - ">="
|
49
57
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.1
|
58
|
+
version: '0.1'
|
59
|
+
- - "<="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1000.0'
|
51
62
|
type: :runtime
|
52
63
|
prerelease: false
|
53
64
|
version_requirements: !ruby/object:Gem::Requirement
|
54
65
|
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '0'
|
58
66
|
- - ">="
|
59
67
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0.1
|
68
|
+
version: '0.1'
|
69
|
+
- - "<="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '1000.0'
|
61
72
|
- !ruby/object:Gem::Dependency
|
62
73
|
name: immosquare-yaml
|
63
74
|
requirement: !ruby/object:Gem::Requirement
|
64
75
|
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
76
|
- - ">="
|
69
77
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.1
|
78
|
+
version: '0.1'
|
79
|
+
- - "<="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1000.0'
|
71
82
|
type: :runtime
|
72
83
|
prerelease: false
|
73
84
|
version_requirements: !ruby/object:Gem::Requirement
|
74
85
|
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
78
86
|
- - ">="
|
79
87
|
- !ruby/object:Gem::Version
|
80
|
-
version: 0.1
|
88
|
+
version: '0.1'
|
89
|
+
- - "<="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '1000.0'
|
81
92
|
- !ruby/object:Gem::Dependency
|
82
93
|
name: rubocop
|
83
94
|
requirement: !ruby/object:Gem::Requirement
|
84
95
|
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '1'
|
88
96
|
- - ">="
|
89
97
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
98
|
+
version: '1.68'
|
99
|
+
- - "<="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1000.0'
|
91
102
|
type: :runtime
|
92
103
|
prerelease: false
|
93
104
|
version_requirements: !ruby/object:Gem::Requirement
|
94
105
|
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '1'
|
98
106
|
- - ">="
|
99
107
|
- !ruby/object:Gem::Version
|
100
|
-
version: 1.
|
108
|
+
version: '1.68'
|
109
|
+
- - "<="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1000.0'
|
101
112
|
description: Immosquare-cleaner streamlines Rails applications by running tools like
|
102
113
|
RuboCop, ERBLint, Stylelint and more. It ensures code quality, readability, and
|
103
114
|
consistency across the application.
|
@@ -119,9 +130,10 @@ files:
|
|
119
130
|
- linters/eslint.config.mjs
|
120
131
|
- linters/jscodeshift/arrow-function-transform.js
|
121
132
|
- linters/prettier.yml
|
122
|
-
- linters/rubocop-3.3.4.yml
|
123
133
|
- linters/rubocop-3.3.6.yml
|
124
134
|
- linters/rubocop.yml
|
135
|
+
- linters/rubocop/cop/custom_cops/pre/comment_normalization.rb
|
136
|
+
- linters/rubocop/cop/custom_cops/style/use_credentials_instead_of_env.rb
|
125
137
|
- linters/rubocop/cop/style/method_call_with_args_parentheses_override.rb
|
126
138
|
- node_modules/.bin/acorn
|
127
139
|
- node_modules/.bin/babylon
|
@@ -34463,7 +34475,6 @@ homepage: https://github.com/immosquare/Immosquare-cleaner
|
|
34463
34475
|
licenses:
|
34464
34476
|
- MIT
|
34465
34477
|
metadata: {}
|
34466
|
-
post_install_message:
|
34467
34478
|
rdoc_options: []
|
34468
34479
|
require_paths:
|
34469
34480
|
- lib
|
@@ -34472,15 +34483,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
34472
34483
|
requirements:
|
34473
34484
|
- - ">="
|
34474
34485
|
- !ruby/object:Gem::Version
|
34475
|
-
version:
|
34486
|
+
version: 3.1.6
|
34476
34487
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
34477
34488
|
requirements:
|
34478
34489
|
- - ">="
|
34479
34490
|
- !ruby/object:Gem::Version
|
34480
34491
|
version: '0'
|
34481
34492
|
requirements: []
|
34482
|
-
rubygems_version: 3.
|
34483
|
-
signing_key:
|
34493
|
+
rubygems_version: 3.6.1
|
34484
34494
|
specification_version: 4
|
34485
34495
|
summary: A gem to lint and organize files in a Rails application.
|
34486
34496
|
test_files: []
|
data/linters/rubocop-3.3.4.yml
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
---
|
2
|
-
require: rubocop/cop/style/method_call_with_args_parentheses_override
|
3
|
-
AllCops:
|
4
|
-
NewCops: enable
|
5
|
-
EnabledByDefault: false
|
6
|
-
UseCache: true
|
7
|
-
SuggestExtensions: false
|
8
|
-
ActiveSupportExtensionsEnabled: true
|
9
|
-
TargetRubyVersion: 3.3.4
|
10
|
-
Metrics:
|
11
|
-
Enabled: false
|
12
|
-
Lint/UselessAssignment:
|
13
|
-
Enabled: false
|
14
|
-
Lint/RescueException:
|
15
|
-
Enabled: false
|
16
|
-
Lint/UnusedMethodArgument:
|
17
|
-
Enabled: false
|
18
|
-
Naming/VariableNumber:
|
19
|
-
Enabled: false
|
20
|
-
Naming/FileName:
|
21
|
-
Enabled: false
|
22
|
-
MethodParameterName:
|
23
|
-
MinNameLength: 1
|
24
|
-
Layout/LeadingEmptyLines:
|
25
|
-
Enabled: false
|
26
|
-
Layout/InitialIndentation:
|
27
|
-
Enabled: false
|
28
|
-
Layout/TrailingEmptyLines:
|
29
|
-
Enabled: false
|
30
|
-
Layout/ExtraSpacing:
|
31
|
-
Enabled: false
|
32
|
-
Layout/LineLength:
|
33
|
-
Enabled: false
|
34
|
-
Layout/TrailingWhitespace:
|
35
|
-
Enabled: true
|
36
|
-
Layout/EmptyLines:
|
37
|
-
Enabled: false
|
38
|
-
Layout/SpaceInsideBlockBraces:
|
39
|
-
SpaceBeforeBlockParameters: false
|
40
|
-
Layout/EmptyLinesAroundClassBody:
|
41
|
-
EnforcedStyle: empty_lines
|
42
|
-
Layout/FirstHashElementIndentation:
|
43
|
-
EnforcedStyle: consistent
|
44
|
-
Layout/ArgumentAlignment:
|
45
|
-
EnforcedStyle: with_fixed_indentation
|
46
|
-
Layout/HashAlignment:
|
47
|
-
EnforcedHashRocketStyle: table
|
48
|
-
Layout/MultilineAssignmentLayout:
|
49
|
-
EnforcedStyle: same_line
|
50
|
-
Layout/SpaceInsideHashLiteralBraces:
|
51
|
-
EnforcedStyle: no_space
|
52
|
-
Layout/MultilineMethodCallIndentation:
|
53
|
-
EnforcedStyle: indented
|
54
|
-
Style/CombinableLoops:
|
55
|
-
Enabled: false
|
56
|
-
Style/SingleArgumentDig:
|
57
|
-
Enabled: false
|
58
|
-
Style/RedundantBegin:
|
59
|
-
Enabled: false
|
60
|
-
Style/MultilineTernaryOperator:
|
61
|
-
Enabled: false
|
62
|
-
Style/NestedTernaryOperator:
|
63
|
-
Enabled: false
|
64
|
-
Style/MultilineIfModifier:
|
65
|
-
Enabled: false
|
66
|
-
Style/FrozenStringLiteralComment:
|
67
|
-
Enabled: false
|
68
|
-
Style/Next:
|
69
|
-
Enabled: false
|
70
|
-
Style/Documentation:
|
71
|
-
Enabled: false
|
72
|
-
Style/IfUnlessModifierOfIfUnless:
|
73
|
-
Enabled: false
|
74
|
-
Style/NegatedIf:
|
75
|
-
Enabled: false
|
76
|
-
Style/MethodCallWithArgsParentheses:
|
77
|
-
Enabled: true
|
78
|
-
Style/FormatStringToken:
|
79
|
-
EnforcedStyle: template
|
80
|
-
Style/NumericPredicate:
|
81
|
-
EnforcedStyle: comparison
|
82
|
-
Style/StringLiterals:
|
83
|
-
EnforcedStyle: double_quotes
|
84
|
-
Style/StringLiteralsInInterpolation:
|
85
|
-
EnforcedStyle: double_quotes
|
86
|
-
Style/HashSyntax:
|
87
|
-
EnforcedStyle: hash_rockets
|
88
|
-
Style/WordArray:
|
89
|
-
EnforcedStyle: brackets
|
90
|
-
Style/SymbolArray:
|
91
|
-
EnforcedStyle: brackets
|
92
|
-
Gemspec/RequireMFA:
|
93
|
-
Enabled: false
|