repo_analyzer 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +103 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.editorconfig +24 -0
- data/.gitignore +9 -0
- data/.rspec +3 -0
- data/.rubocop.yml +505 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +320 -0
- data/Guardfile +12 -0
- data/LICENSE.txt +21 -0
- data/README.md +165 -0
- data/Rakefile +10 -0
- data/app/assets/config/repo_analyzer_manifest.js +1 -0
- data/app/assets/images/repo_analyzer/.keep +0 -0
- data/app/assets/stylesheets/repo_analyzer/application.css +15 -0
- data/app/clients/repo_analyzer/github_client.rb +31 -0
- data/app/controllers/repo_analyzer/application_controller.rb +4 -0
- data/app/extractors/repo_analyzer/brakeman_extractor.rb +33 -0
- data/app/extractors/repo_analyzer/circleci_extractor.rb +46 -0
- data/app/extractors/repo_analyzer/github_extractor.rb +64 -0
- data/app/extractors/repo_analyzer/power_types_extractor.rb +21 -0
- data/app/extractors/repo_analyzer/project_config_extractor.rb +53 -0
- data/app/extractors/repo_analyzer/project_info_extractor.rb +20 -0
- data/app/extractors/repo_analyzer/project_versions_extractor.rb +80 -0
- data/app/extractors/repo_analyzer/rails_best_practices_extractor.rb +36 -0
- data/app/extractors/repo_analyzer/rubocop_extractor.rb +74 -0
- data/app/extractors/repo_analyzer/tests_info_extractor.rb +87 -0
- data/app/helpers/repo_analyzer/application_helper.rb +4 -0
- data/app/jobs/repo_analyzer/application_job.rb +4 -0
- data/app/jobs/repo_analyzer/extract_project_info_job.rb +35 -0
- data/app/jobs/repo_analyzer/post_extracted_info_job.rb +28 -0
- data/app/mailers/repo_analyzer/application_mailer.rb +6 -0
- data/app/models/repo_analyzer/application_record.rb +5 -0
- data/app/utils/output_utils.rb +10 -0
- data/app/values/repo_analyzer/project_data_bridge.rb +48 -0
- data/app/views/layouts/repo_analyzer/application.html.erb +15 -0
- data/bin/rails +25 -0
- data/config/routes.rb +2 -0
- data/lib/generators/repo_analyzer/install/USAGE +5 -0
- data/lib/generators/repo_analyzer/install/install_generator.rb +19 -0
- data/lib/generators/repo_analyzer/install/templates/initializer.rb +2 -0
- data/lib/repo_analyzer/engine.rb +15 -0
- data/lib/repo_analyzer/example_class.rb +7 -0
- data/lib/repo_analyzer/version.rb +3 -0
- data/lib/repo_analyzer.rb +48 -0
- data/lib/tasks/repo_analyzer_tasks.rake +7 -0
- data/repo_analyzer.gemspec +42 -0
- data/spec/assets/test_project/README.md +1 -0
- data/spec/assets/test_project/app/commands/some_comand.rb +0 -0
- data/spec/assets/test_project/app/javascript/src/component.spec.js +0 -0
- data/spec/assets/test_project/app/javascript/src/components/component.spec.js +0 -0
- data/spec/assets/test_project/app/observers/some_observer.rb +0 -0
- data/spec/assets/test_project/old_circleci_config.yml +21 -0
- data/spec/assets/test_project/spec/commands/command1_spec.rb +0 -0
- data/spec/assets/test_project/spec/commands/command2_spec.rb +0 -0
- data/spec/assets/test_project/spec/integration/integration1_spec.rb +0 -0
- data/spec/assets/test_project/spec/system/system_test_spec.rb +0 -0
- data/spec/assets/test_project/valid_circleci_config.yml +152 -0
- data/spec/assets/test_project/valid_gem_gemfile_lock +14 -0
- data/spec/assets/test_project/valid_gemfile_lock +684 -0
- data/spec/assets/test_project/valid_makefile +35 -0
- data/spec/assets/test_project/valid_package_json +84 -0
- data/spec/assets/test_project/valid_package_json_without_vue +74 -0
- data/spec/assets/test_project/valid_rubocop_rules.yml +54 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/javascript/packs/application.js +15 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config/application.rb +38 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +81 -0
- data/spec/dummy/config/environments/production.rb +120 -0
- data/spec/dummy/config/environments/test.rb +59 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +12 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/permissions_policy.rb +11 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +43 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/config.ru +6 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/extractors/brakeman_extractor_spec.rb +73 -0
- data/spec/extractors/circleci_extractor_spec.rb +45 -0
- data/spec/extractors/github_extractor_spec.rb +77 -0
- data/spec/extractors/power_types_extractor_spec.rb +18 -0
- data/spec/extractors/project_config_extractor_spec.rb +52 -0
- data/spec/extractors/project_versions_extractor_spec.rb +63 -0
- data/spec/extractors/rails_best_practices_extractor_spec.rb +53 -0
- data/spec/extractors/rubocop_extractor_spec.rb +113 -0
- data/spec/extractors/tests_info_extractor_spec.rb +65 -0
- data/spec/fixtures/files/image.png +0 -0
- data/spec/fixtures/files/video.mp4 +0 -0
- data/spec/jobs/repo_analyzer/extract_project_info_job_spec.rb +50 -0
- data/spec/jobs/repo_analyzer/post_extracted_info_job_spec.rb +52 -0
- data/spec/rails_helper.rb +42 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/support/repo_analyzer_helpers.rb +37 -0
- metadata +518 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1c041d9cb3adb2da0b9f65b650ac2cea07e03b5cb9c18f91bc088e0d64fdf0aa
|
4
|
+
data.tar.gz: 7256cb29b42d8be0cf7debeee505b96c038226e5de44718cb10978b75c255472
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: db7ef6fbb1f035680630a1c31f89ff9e323b2ca0cf37daf43fbdb790a1d7b7cb45eb808f10ab3c3cb5826d5df61302f416a3f8c6417b22d73534591049a0ab50
|
7
|
+
data.tar.gz: 68e5aa2262cbf3b463c30d4b6f595eeaa6bdd547996f7f1802ab48cf5e92170ff11a0157a2dc5303b07c942ad6137d9b073d10e243eb20741c527c8079b4c88f
|
@@ -0,0 +1,103 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
3
|
+
env-vars: &env-vars
|
4
|
+
RAILS_ENV: test
|
5
|
+
NODE_ENV: test
|
6
|
+
BUNDLE_PATH: vendor/bundle
|
7
|
+
|
8
|
+
orbs:
|
9
|
+
ruby: circleci/ruby@0.1.2
|
10
|
+
|
11
|
+
executors:
|
12
|
+
main-executor:
|
13
|
+
parameters:
|
14
|
+
ruby-version:
|
15
|
+
description: "Ruby version"
|
16
|
+
default: "2.7"
|
17
|
+
type: string
|
18
|
+
docker:
|
19
|
+
- image: circleci/ruby:<<parameters.ruby-version>>-node
|
20
|
+
environment: *env-vars
|
21
|
+
|
22
|
+
commands:
|
23
|
+
setup:
|
24
|
+
description: checkout code and install dependencies
|
25
|
+
steps:
|
26
|
+
- checkout
|
27
|
+
- run:
|
28
|
+
name: Install bundle dependencies
|
29
|
+
command: |
|
30
|
+
BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")
|
31
|
+
gem install bundler:$BUNDLER_VERSION
|
32
|
+
bundle _$(echo $BUNDLER_VERSION)_ install
|
33
|
+
|
34
|
+
jobs:
|
35
|
+
lint:
|
36
|
+
executor: main-executor
|
37
|
+
steps:
|
38
|
+
- setup
|
39
|
+
- run:
|
40
|
+
name: Install reviewdog
|
41
|
+
command: |
|
42
|
+
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
|
43
|
+
- run:
|
44
|
+
name: Get files to lint
|
45
|
+
command: |
|
46
|
+
mkdir tmp
|
47
|
+
git diff origin/master --name-only --diff-filter=d > tmp/files_to_lint
|
48
|
+
- run:
|
49
|
+
name: Run rubocop
|
50
|
+
shell: /bin/bash
|
51
|
+
command: |
|
52
|
+
cat tmp/files_to_lint | grep -E '.+\.(rb)$' | xargs bundle exec rubocop --force-exclusion \
|
53
|
+
| ./bin/reviewdog -reporter=github-pr-review -f=rubocop
|
54
|
+
test:
|
55
|
+
parameters:
|
56
|
+
ruby-version:
|
57
|
+
description: "Ruby version"
|
58
|
+
default: "2.7"
|
59
|
+
type: string
|
60
|
+
executor:
|
61
|
+
name: main-executor
|
62
|
+
ruby-version: <<parameters.ruby-version>>
|
63
|
+
steps:
|
64
|
+
- setup
|
65
|
+
- run:
|
66
|
+
name: Run Tests
|
67
|
+
command: |
|
68
|
+
RSPEC_JUNIT_ARGS="-r rspec_junit_formatter -f RspecJunitFormatter -o test_results/rspec.xml"
|
69
|
+
RSPEC_FORMAT_ARGS="-f progress --no-color -p 10"
|
70
|
+
bundle exec rspec ./spec $RSPEC_FORMAT_ARGS $RSPEC_JUNIT_ARGS
|
71
|
+
- store_test_results:
|
72
|
+
path: test_results
|
73
|
+
deploy:
|
74
|
+
executor: main-executor
|
75
|
+
steps:
|
76
|
+
- setup
|
77
|
+
- run:
|
78
|
+
name: Setup rubygems
|
79
|
+
command: bash .circleci/setup-rubygems.sh
|
80
|
+
- run:
|
81
|
+
name: Publish to rubygems
|
82
|
+
command: |
|
83
|
+
gem build repo_analyzer.gemspec
|
84
|
+
version_tag=$(git describe --tags)
|
85
|
+
gem push repo_analyzer-${version_tag#v}.gem
|
86
|
+
|
87
|
+
workflows:
|
88
|
+
version: 2
|
89
|
+
main:
|
90
|
+
jobs:
|
91
|
+
- lint:
|
92
|
+
context: org-global
|
93
|
+
- test:
|
94
|
+
matrix:
|
95
|
+
parameters:
|
96
|
+
ruby-version: ["2.7"]
|
97
|
+
- deploy:
|
98
|
+
context: org-global
|
99
|
+
filters:
|
100
|
+
tags:
|
101
|
+
only: /.*/
|
102
|
+
branches:
|
103
|
+
ignore: /.*/
|
data/.editorconfig
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# EditorConfig helps developers define and maintain consistent
|
2
|
+
# coding styles between different editors and IDEs
|
3
|
+
# editorconfig.org
|
4
|
+
|
5
|
+
root = true
|
6
|
+
|
7
|
+
[*]
|
8
|
+
|
9
|
+
# Change these settings to your own preference
|
10
|
+
indent_style = space
|
11
|
+
indent_size = 2
|
12
|
+
|
13
|
+
# We recommend you to keep these unchanged
|
14
|
+
end_of_line = lf
|
15
|
+
charset = utf-8
|
16
|
+
trim_trailing_whitespace = true
|
17
|
+
insert_final_newline = true
|
18
|
+
|
19
|
+
[*.js]
|
20
|
+
indent_style = space
|
21
|
+
indent_size = 2
|
22
|
+
|
23
|
+
[*.md]
|
24
|
+
trim_trailing_whitespace = false
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,505 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rails
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- "vendor/**/*"
|
6
|
+
- "db/**/*"
|
7
|
+
- "bin/**/*"
|
8
|
+
TargetRubyVersion: 2.7
|
9
|
+
Rails:
|
10
|
+
Enabled: true
|
11
|
+
Layout/ParameterAlignment:
|
12
|
+
Description: Align the parameters of a method call if they span more than one line.
|
13
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
14
|
+
Enabled: true
|
15
|
+
EnforcedStyle: with_fixed_indentation
|
16
|
+
SupportedStyles:
|
17
|
+
- with_first_parameter
|
18
|
+
- with_fixed_indentation
|
19
|
+
Metrics/BlockLength:
|
20
|
+
Enabled: false
|
21
|
+
Style/ClassAndModuleChildren:
|
22
|
+
Description: Checks style of children classes and modules.
|
23
|
+
Enabled: false
|
24
|
+
EnforcedStyle: nested
|
25
|
+
SupportedStyles:
|
26
|
+
- nested
|
27
|
+
- compact
|
28
|
+
Style/CommentAnnotation:
|
29
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
30
|
+
REVIEW).
|
31
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
32
|
+
Enabled: false
|
33
|
+
Keywords:
|
34
|
+
- TODO
|
35
|
+
- FIXME
|
36
|
+
- OPTIMIZE
|
37
|
+
- HACK
|
38
|
+
- REVIEW
|
39
|
+
Naming/FileName:
|
40
|
+
Description: Use snake_case for source file names.
|
41
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
42
|
+
Enabled: false
|
43
|
+
Exclude: []
|
44
|
+
Style/FormatString:
|
45
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
46
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
47
|
+
Enabled: false
|
48
|
+
EnforcedStyle: format
|
49
|
+
SupportedStyles:
|
50
|
+
- format
|
51
|
+
- sprintf
|
52
|
+
- percent
|
53
|
+
Style/FrozenStringLiteralComment:
|
54
|
+
Enabled: false
|
55
|
+
Style/GlobalVars:
|
56
|
+
Description: Do not introduce global variables.
|
57
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
58
|
+
Enabled: false
|
59
|
+
AllowedVariables: []
|
60
|
+
Style/GuardClause:
|
61
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
62
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
63
|
+
Enabled: false
|
64
|
+
MinBodyLength: 1
|
65
|
+
Style/IfUnlessModifier:
|
66
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
67
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
68
|
+
Enabled: false
|
69
|
+
Style/LambdaCall:
|
70
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
71
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
72
|
+
Enabled: false
|
73
|
+
EnforcedStyle: call
|
74
|
+
SupportedStyles:
|
75
|
+
- call
|
76
|
+
- braces
|
77
|
+
Style/Next:
|
78
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
79
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
80
|
+
Enabled: false
|
81
|
+
EnforcedStyle: skip_modifier_ifs
|
82
|
+
MinBodyLength: 3
|
83
|
+
SupportedStyles:
|
84
|
+
- skip_modifier_ifs
|
85
|
+
- always
|
86
|
+
Layout/MultilineOperationIndentation:
|
87
|
+
Description: Checks indentation of binary operations that span more than one line.
|
88
|
+
Enabled: true
|
89
|
+
EnforcedStyle: indented
|
90
|
+
SupportedStyles:
|
91
|
+
- aligned
|
92
|
+
- indented
|
93
|
+
Style/MutableConstant:
|
94
|
+
Description: Do not assign mutable objects to constants.
|
95
|
+
Enabled: false
|
96
|
+
Style/NumericLiterals:
|
97
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
98
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
99
|
+
Enabled: false
|
100
|
+
MinDigits: 5
|
101
|
+
Style/PercentLiteralDelimiters:
|
102
|
+
Description: Use `%`-literal delimiters consistently
|
103
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
104
|
+
Enabled: false
|
105
|
+
PreferredDelimiters:
|
106
|
+
"%": "()"
|
107
|
+
"%i": "()"
|
108
|
+
"%q": "()"
|
109
|
+
"%Q": "()"
|
110
|
+
"%r": "{}"
|
111
|
+
"%s": "()"
|
112
|
+
"%w": "()"
|
113
|
+
"%W": "()"
|
114
|
+
"%x": "()"
|
115
|
+
Naming/PredicateName:
|
116
|
+
Description: Check the names of predicate methods.
|
117
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
118
|
+
Enabled: true
|
119
|
+
NamePrefix:
|
120
|
+
- is_
|
121
|
+
- has_
|
122
|
+
- have_
|
123
|
+
ForbiddenPrefixes:
|
124
|
+
- is_
|
125
|
+
Style/RaiseArgs:
|
126
|
+
Description: Checks the arguments passed to raise/fail.
|
127
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
128
|
+
Enabled: false
|
129
|
+
EnforcedStyle: exploded
|
130
|
+
SupportedStyles:
|
131
|
+
- compact
|
132
|
+
- exploded
|
133
|
+
Style/SignalException:
|
134
|
+
Description: Checks for proper usage of fail and raise.
|
135
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
136
|
+
Enabled: false
|
137
|
+
EnforcedStyle: semantic
|
138
|
+
SupportedStyles:
|
139
|
+
- only_raise
|
140
|
+
- only_fail
|
141
|
+
- semantic
|
142
|
+
Style/SingleLineMethods:
|
143
|
+
Description: Avoid single-line methods.
|
144
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
145
|
+
Enabled: false
|
146
|
+
AllowIfMethodIsEmpty: true
|
147
|
+
Style/StringLiterals:
|
148
|
+
Description: Checks if uses of quotes match the configured preference.
|
149
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
150
|
+
Enabled: false
|
151
|
+
EnforcedStyle: double_quotes
|
152
|
+
SupportedStyles:
|
153
|
+
- single_quotes
|
154
|
+
- double_quotes
|
155
|
+
Style/TrailingCommaInArguments:
|
156
|
+
Description: Checks for trailing comma in argument lists.
|
157
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
|
158
|
+
Enabled: true
|
159
|
+
Style/TrailingCommaInArrayLiteral:
|
160
|
+
Description: Checks for trailing comma in array and hash literals.
|
161
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
162
|
+
Enabled: true
|
163
|
+
Style/TrailingCommaInHashLiteral:
|
164
|
+
Description: Checks for trailing comma in array and hash literals.
|
165
|
+
StyleGuide: https://github.com/rubocop-hq/ruby-style-guide#no-trailing-array-commas
|
166
|
+
Enabled: true
|
167
|
+
Style/TrivialAccessors:
|
168
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
169
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
170
|
+
Enabled: false
|
171
|
+
ExactNameMatch: false
|
172
|
+
AllowPredicates: false
|
173
|
+
AllowDSLWriters: false
|
174
|
+
AllowedMethods:
|
175
|
+
- to_ary
|
176
|
+
- to_a
|
177
|
+
- to_c
|
178
|
+
- to_enum
|
179
|
+
- to_h
|
180
|
+
- to_hash
|
181
|
+
- to_i
|
182
|
+
- to_int
|
183
|
+
- to_io
|
184
|
+
- to_open
|
185
|
+
- to_path
|
186
|
+
- to_proc
|
187
|
+
- to_r
|
188
|
+
- to_regexp
|
189
|
+
- to_str
|
190
|
+
- to_s
|
191
|
+
- to_sym
|
192
|
+
Style/WhileUntilModifier:
|
193
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
194
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
195
|
+
Enabled: false
|
196
|
+
Style/WordArray:
|
197
|
+
Enabled: false
|
198
|
+
Style/ExponentialNotation:
|
199
|
+
Enabled: true
|
200
|
+
Style/HashEachMethods:
|
201
|
+
Description: Use Hash#each_key and Hash#each_value.
|
202
|
+
Enabled: true
|
203
|
+
Style/HashTransformKeys:
|
204
|
+
Description: Prefer `transform_keys` over `each_with_object` and `map`.
|
205
|
+
Enabled: true
|
206
|
+
Style/HashTransformValues:
|
207
|
+
Description: Prefer `transform_values` over `each_with_object` and `map`.
|
208
|
+
Enabled: true
|
209
|
+
Metrics/AbcSize:
|
210
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
211
|
+
conditions.
|
212
|
+
Enabled: true
|
213
|
+
Max: 25
|
214
|
+
Metrics/BlockNesting:
|
215
|
+
Description: Avoid excessive block nesting
|
216
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
217
|
+
Enabled: true
|
218
|
+
Max: 3
|
219
|
+
Metrics/ClassLength:
|
220
|
+
Description: Avoid classes longer than 100 lines of code.
|
221
|
+
Enabled: false
|
222
|
+
CountComments: false
|
223
|
+
Max: 100
|
224
|
+
Metrics/MethodLength:
|
225
|
+
Description: Avoid methods longer than 15 lines of code.
|
226
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
227
|
+
Enabled: true
|
228
|
+
CountComments: true
|
229
|
+
Max: 15
|
230
|
+
Exclude:
|
231
|
+
- "spec/**/*"
|
232
|
+
Metrics/ParameterLists:
|
233
|
+
Description: Avoid long parameter lists.
|
234
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
235
|
+
Enabled: false
|
236
|
+
Max: 5
|
237
|
+
CountKeywordArgs: true
|
238
|
+
Lint/AssignmentInCondition:
|
239
|
+
Description: Don't use assignment in conditions.
|
240
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
241
|
+
Enabled: false
|
242
|
+
AllowSafeAssignment: true
|
243
|
+
Layout/LineLength:
|
244
|
+
Description: Limit lines to 100 characters.
|
245
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#100-character-limits
|
246
|
+
Enabled: true
|
247
|
+
Max: 100
|
248
|
+
AllowURI: true
|
249
|
+
URISchemes:
|
250
|
+
- http
|
251
|
+
- https
|
252
|
+
Layout/EndAlignment:
|
253
|
+
Description: Align ends correctly.
|
254
|
+
Enabled: true
|
255
|
+
EnforcedStyleAlignWith: keyword
|
256
|
+
SupportedStylesAlignWith:
|
257
|
+
- keyword
|
258
|
+
- variable
|
259
|
+
Layout/DefEndAlignment:
|
260
|
+
Description: Align ends corresponding to defs correctly.
|
261
|
+
Enabled: true
|
262
|
+
EnforcedStyleAlignWith: start_of_line
|
263
|
+
SupportedStylesAlignWith:
|
264
|
+
- start_of_line
|
265
|
+
- def
|
266
|
+
Layout/SpaceAroundMethodCallOperator:
|
267
|
+
Description: Checks method call operators to not have spaces around them.
|
268
|
+
Enabled: true
|
269
|
+
Style/SymbolArray:
|
270
|
+
Description: Use %i or %I for arrays of symbols.
|
271
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
272
|
+
Enabled: false
|
273
|
+
Layout/ExtraSpacing:
|
274
|
+
Description: Do not use unnecessary spacing.
|
275
|
+
Enabled: false
|
276
|
+
Naming/AccessorMethodName:
|
277
|
+
Description: Check the naming of accessor methods for get_/set_.
|
278
|
+
Enabled: false
|
279
|
+
Style/Alias:
|
280
|
+
Description: Use alias_method instead of alias.
|
281
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
282
|
+
Enabled: false
|
283
|
+
Style/ArrayJoin:
|
284
|
+
Description: Use Array#join instead of Array#*.
|
285
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
286
|
+
Enabled: false
|
287
|
+
Style/AsciiComments:
|
288
|
+
Description: Use only ascii symbols in comments.
|
289
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
290
|
+
Enabled: false
|
291
|
+
Naming/AsciiIdentifiers:
|
292
|
+
Description: Use only ascii symbols in identifiers.
|
293
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
294
|
+
Enabled: false
|
295
|
+
Style/Attr:
|
296
|
+
Description: Checks for uses of Module#attr.
|
297
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
298
|
+
Enabled: false
|
299
|
+
Style/BlockComments:
|
300
|
+
Description: Do not use block comments.
|
301
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
302
|
+
Enabled: false
|
303
|
+
Style/CaseEquality:
|
304
|
+
Description: Avoid explicit use of the case equality operator(===).
|
305
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
306
|
+
Enabled: false
|
307
|
+
Style/CharacterLiteral:
|
308
|
+
Description: Checks for uses of character literals.
|
309
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
310
|
+
Enabled: false
|
311
|
+
Style/ClassVars:
|
312
|
+
Description: Avoid the use of class variables.
|
313
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
314
|
+
Enabled: false
|
315
|
+
Style/ColonMethodCall:
|
316
|
+
Description: 'Do not use :: for method call.'
|
317
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
318
|
+
Enabled: false
|
319
|
+
Style/PreferredHashMethods:
|
320
|
+
Description: Checks for use of deprecated Hash methods.
|
321
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
|
322
|
+
Enabled: false
|
323
|
+
Style/Documentation:
|
324
|
+
Description: Document classes and non-namespace modules.
|
325
|
+
Enabled: false
|
326
|
+
Style/DoubleNegation:
|
327
|
+
Description: Checks for uses of double negation (!!).
|
328
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
329
|
+
Enabled: false
|
330
|
+
Style/EachWithObject:
|
331
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
332
|
+
Enabled: false
|
333
|
+
Style/EmptyElse:
|
334
|
+
Description: Avoid empty else-clauses.
|
335
|
+
Enabled: true
|
336
|
+
Style/EmptyLiteral:
|
337
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
338
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
339
|
+
Enabled: false
|
340
|
+
Layout/EndOfLine:
|
341
|
+
Description: Use Unix-style line endings.
|
342
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
343
|
+
Enabled: true
|
344
|
+
Style/EvenOdd:
|
345
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
346
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
347
|
+
Enabled: false
|
348
|
+
Lint/FlipFlop:
|
349
|
+
Description: Checks for flip flops
|
350
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
351
|
+
Enabled: false
|
352
|
+
Style/IfWithSemicolon:
|
353
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
354
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
355
|
+
Enabled: false
|
356
|
+
Style/Lambda:
|
357
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
358
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
359
|
+
Enabled: false
|
360
|
+
Style/LineEndConcatenation:
|
361
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
362
|
+
end.
|
363
|
+
Enabled: false
|
364
|
+
Style/ModuleFunction:
|
365
|
+
Description: Checks for usage of `extend self` in modules.
|
366
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
367
|
+
Enabled: false
|
368
|
+
Style/MultilineBlockChain:
|
369
|
+
Description: Avoid multi-line chains of blocks.
|
370
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
371
|
+
Enabled: false
|
372
|
+
Layout/MultilineBlockLayout:
|
373
|
+
Description: Ensures newlines after multiline block do statements.
|
374
|
+
Enabled: false
|
375
|
+
Style/NegatedIf:
|
376
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
377
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
378
|
+
Enabled: false
|
379
|
+
Style/NegatedWhile:
|
380
|
+
Description: Favor until over while for negative conditions.
|
381
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
382
|
+
Enabled: false
|
383
|
+
Style/NilComparison:
|
384
|
+
Description: Prefer x.nil? to x == nil.
|
385
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
386
|
+
Enabled: false
|
387
|
+
Style/OneLineConditional:
|
388
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
389
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
390
|
+
Enabled: false
|
391
|
+
Naming/BinaryOperatorParameterName:
|
392
|
+
Description: When defining binary operators, name the argument other.
|
393
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
394
|
+
Enabled: false
|
395
|
+
Style/PerlBackrefs:
|
396
|
+
Description: Avoid Perl-style regex back references.
|
397
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
398
|
+
Enabled: false
|
399
|
+
Style/Proc:
|
400
|
+
Description: Use proc instead of Proc.new.
|
401
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
402
|
+
Enabled: false
|
403
|
+
Style/SelfAssignment:
|
404
|
+
Description: Checks for places where self-assignment shorthand should have been
|
405
|
+
used.
|
406
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
407
|
+
Enabled: false
|
408
|
+
Layout/SpaceBeforeFirstArg:
|
409
|
+
Description: Put a space between a method name and the first argument in a method
|
410
|
+
call without parentheses.
|
411
|
+
Enabled: true
|
412
|
+
Layout/SpaceAroundOperators:
|
413
|
+
Description: Use spaces around operators.
|
414
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
415
|
+
Enabled: true
|
416
|
+
Layout/SpaceInsideParens:
|
417
|
+
Description: No spaces after ( or before ).
|
418
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
419
|
+
Enabled: true
|
420
|
+
Style/SpecialGlobalVars:
|
421
|
+
Description: Avoid Perl-style global variables.
|
422
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
423
|
+
Enabled: false
|
424
|
+
Style/VariableInterpolation:
|
425
|
+
Description: Don't interpolate global, instance and class variables directly in
|
426
|
+
strings.
|
427
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
428
|
+
Enabled: false
|
429
|
+
Style/WhenThen:
|
430
|
+
Description: Use when x then ... for one-line cases.
|
431
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
432
|
+
Enabled: false
|
433
|
+
Lint/AmbiguousOperator:
|
434
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
435
|
+
without parentheses.
|
436
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
437
|
+
Enabled: false
|
438
|
+
Lint/AmbiguousRegexpLiteral:
|
439
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
440
|
+
invocation without parenthesis.
|
441
|
+
Enabled: false
|
442
|
+
Layout/BlockAlignment:
|
443
|
+
Description: Align block ends correctly.
|
444
|
+
Enabled: true
|
445
|
+
Layout/ConditionPosition:
|
446
|
+
Description: Checks for condition placed in a confusing position relative to the
|
447
|
+
keyword.
|
448
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
449
|
+
Enabled: false
|
450
|
+
Lint/DeprecatedClassMethods:
|
451
|
+
Description: Check for deprecated class method calls.
|
452
|
+
Enabled: false
|
453
|
+
Lint/ElseLayout:
|
454
|
+
Description: Check for odd code arrangement in an else block.
|
455
|
+
Enabled: false
|
456
|
+
Lint/SuppressedException:
|
457
|
+
Description: Don't suppress exception.
|
458
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
459
|
+
Enabled: false
|
460
|
+
Lint/LiteralAsCondition:
|
461
|
+
Description: Checks of literals used in conditions.
|
462
|
+
Enabled: false
|
463
|
+
Lint/LiteralInInterpolation:
|
464
|
+
Description: Checks for literals used in interpolation.
|
465
|
+
Enabled: false
|
466
|
+
Lint/Loop:
|
467
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
468
|
+
for post-loop tests.
|
469
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
470
|
+
Enabled: false
|
471
|
+
Lint/ParenthesesAsGroupedExpression:
|
472
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
473
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
474
|
+
Enabled: false
|
475
|
+
Lint/RequireParentheses:
|
476
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
477
|
+
Enabled: false
|
478
|
+
Lint/UnderscorePrefixedVariableName:
|
479
|
+
Description: Do not use prefix `_` for a variable that is used.
|
480
|
+
Enabled: false
|
481
|
+
Lint/Void:
|
482
|
+
Description: Possible use of operator/literal/variable in void context.
|
483
|
+
Enabled: false
|
484
|
+
Lint/RaiseException:
|
485
|
+
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
486
|
+
Enabled: true
|
487
|
+
Lint/StructNewOverride:
|
488
|
+
Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
|
489
|
+
Enabled: true
|
490
|
+
Rails/Delegate:
|
491
|
+
Description: Prefer delegate method for delegations.
|
492
|
+
Enabled: false
|
493
|
+
Style/OptionalBooleanParameter:
|
494
|
+
Description: 'Use keyword arguments when defining method with boolean argument.'
|
495
|
+
Enabled: false
|
496
|
+
Lint/MissingSuper:
|
497
|
+
Description: >-
|
498
|
+
This cop checks for the presence of constructors and lifecycle callbacks
|
499
|
+
without calls to `super`'.
|
500
|
+
Enabled: false
|
501
|
+
Style/RedundantFileExtensionInRequire:
|
502
|
+
Description: >-
|
503
|
+
Checks for the presence of superfluous `.rb` extension in
|
504
|
+
the filename provided to `require` and `require_relative`.
|
505
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
|
+
|
4
|
+
# Specify your gem's dependencies in repo_analyzer.gemspec.
|
5
|
+
gemspec
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem 'sqlite3'
|
9
|
+
end
|
10
|
+
|
11
|
+
# To use a debugger
|
12
|
+
# gem 'byebug', group: [:development, :test]
|