scc-codestyle 0.5.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/build-gem.yml +26 -0
- data/.github/workflows/gem-push.yml +6 -2
- data/.github/workflows/rubocop.yml +20 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +14 -0
- data/Dockerfile +5 -0
- data/Makefile +6 -0
- data/README.md +14 -0
- data/default.yml +4 -13
- data/lib/scc/codestyle/version.rb +1 -1
- metadata +9 -5
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4244a7b6c5fa60bb4e8920dc47307a83cf41c65281407d5e0612820649253784
|
4
|
+
data.tar.gz: ab83c756469ae868b213f5e4a126af1ce5c7380070623abde2c8954ea9e1e8a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2699ca812f2b65ef699bef450a2b5fe1ca4505274e3dceaa422a19f12cbc3146dcccc3bfa9cc28af2a264d33b11f6241582cfd17c2d1b5dd108ed39e7b4c3c49
|
7
|
+
data.tar.gz: 33ea6885528d946a439bbb7fc1b1aa37e6997a1d3adfc9ac35cd1bde7b153a89fb1a19975da54d92d91a88537d0e40751f7d2dfcd4377b95b6c34aca6b4991b5
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "weekly"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Check if the gem exists on rubygems.org
|
2
|
+
|
3
|
+
on: [pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build-gem:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
continue-on-error: true
|
9
|
+
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby-version: ['2.5', '2.7']
|
13
|
+
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v2
|
16
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby-version }}
|
20
|
+
- name: Check if gem exists
|
21
|
+
run: |
|
22
|
+
GEM_VERSION=$(ruby -e "require 'scc/codestyle'; print Scc::Codestyle::VERSION" -I lib)
|
23
|
+
# if we install the gem, then the $GEM_VERSION already exist on rubygems.org
|
24
|
+
# therefore error
|
25
|
+
gem install -q --silent scc-codestyle -v $GEM_VERSION && (touch failed-install && exit 0) || exit 0
|
26
|
+
test -f failed-install && (echo "bump the gem version!" && exit 1)
|
@@ -3,6 +3,10 @@ name: scc-codestyle
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches: [ master ]
|
6
|
+
paths:
|
7
|
+
- default.yml
|
8
|
+
- scc-codestyle.gemspec
|
9
|
+
- lib/scc/codestyle/version.rb
|
6
10
|
|
7
11
|
jobs:
|
8
12
|
build:
|
@@ -14,10 +18,10 @@ jobs:
|
|
14
18
|
|
15
19
|
steps:
|
16
20
|
- uses: actions/checkout@v2
|
17
|
-
- name: Set up Ruby 2.
|
21
|
+
- name: Set up Ruby 2.7
|
18
22
|
uses: actions/setup-ruby@v1
|
19
23
|
with:
|
20
|
-
ruby-version: 2.
|
24
|
+
ruby-version: 2.7.6
|
21
25
|
|
22
26
|
- name: Publish to RubyGems
|
23
27
|
run: |
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Rubocop
|
2
|
+
|
3
|
+
on: [pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
rubocop:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 2.7.6
|
15
|
+
|
16
|
+
|
17
|
+
- name: Run rubocop
|
18
|
+
run: |
|
19
|
+
bundle install
|
20
|
+
bundle exec rubocop
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2022-07-22 12:23:32 UTC using RuboCop version 1.31.2.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'scc-codestyle.gemspec'
|
data/Dockerfile
ADDED
data/Makefile
ADDED
data/README.md
CHANGED
@@ -41,3 +41,17 @@ And add this to `.rubocop.yml` below the previous block:
|
|
41
41
|
```yaml
|
42
42
|
inherit_from: .rubocop_todo.yml
|
43
43
|
```
|
44
|
+
|
45
|
+
### Development
|
46
|
+
|
47
|
+
Build the docker container with:
|
48
|
+
|
49
|
+
```bash
|
50
|
+
$ make build
|
51
|
+
```
|
52
|
+
|
53
|
+
And then enter in the container with:
|
54
|
+
|
55
|
+
```bash
|
56
|
+
$ make console
|
57
|
+
```
|
data/default.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.7
|
3
3
|
DisplayCopNames: true
|
4
4
|
DisplayStyleGuide: true
|
5
5
|
ExtraDetails: true
|
@@ -18,14 +18,6 @@ require:
|
|
18
18
|
- rubocop-rspec
|
19
19
|
- rubocop-thread_safety
|
20
20
|
|
21
|
-
# TODO: These three checks are ruby 2.3-only. Let's discuss them after we've upgraded
|
22
|
-
Style/SafeNavigation:
|
23
|
-
Enabled: false
|
24
|
-
Style/NumericPredicate:
|
25
|
-
Enabled: false
|
26
|
-
Layout/HeredocIndentation:
|
27
|
-
Enabled: false
|
28
|
-
|
29
21
|
# TODO: team wants to have this enabled (2017-07-13)
|
30
22
|
# This cop is quite some work. Last time we checked we had 63 offenses and each would need a 'rubocop:disable' (no one will ever improve them then) or a proper fix.
|
31
23
|
# We should do that with caution. Maybe as a separate (Demolition Squad?) card.
|
@@ -653,7 +645,6 @@ Lint/UnreachableLoop: # (new in 0.89)
|
|
653
645
|
Enabled: true
|
654
646
|
Lint/UselessMethodDefinition: # (new in 0.90)
|
655
647
|
Enabled: true
|
656
|
-
AllowComments: true
|
657
648
|
Lint/UselessTimes: # (new in 0.91)
|
658
649
|
Enabled: true
|
659
650
|
Style/AccessorGrouping: # (new in 0.87)
|
@@ -723,7 +714,7 @@ Performance/StringInclude: # (new in 1.7)
|
|
723
714
|
Enabled: true
|
724
715
|
Performance/Sum: # (new in 1.8)
|
725
716
|
Enabled: true
|
726
|
-
Gemspec/
|
717
|
+
Gemspec/DeprecatedAttributeAssignment:
|
727
718
|
Enabled: true
|
728
719
|
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
729
720
|
Enabled: true
|
@@ -838,8 +829,6 @@ Rails/AttributeDefaultBlockValue: # new in 2.9
|
|
838
829
|
Enabled: true
|
839
830
|
Rails/EagerEvaluationLogMessage: # new in 2.11
|
840
831
|
Enabled: true
|
841
|
-
Rails/ExpandedDateRange: # new in 2.11
|
842
|
-
Enabled: true
|
843
832
|
Rails/FindById: # new in 2.7
|
844
833
|
Enabled: true
|
845
834
|
Rails/I18nLocaleAssignment: # new in 2.11
|
@@ -848,6 +837,8 @@ Rails/Inquiry: # new in 2.7
|
|
848
837
|
Enabled: true
|
849
838
|
Rails/MailerName: # new in 2.7
|
850
839
|
Enabled: true
|
840
|
+
Rails/ExpandedDateRange: # new in 2.11
|
841
|
+
Enabled: true
|
851
842
|
Rails/MatchRoute: # new in 2.7
|
852
843
|
Enabled: true
|
853
844
|
Rails/NegateInclude: # new in 2.7
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scc-codestyle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SCC Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -129,12 +129,17 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- ".github/dependabot.yml"
|
133
|
+
- ".github/workflows/build-gem.yml"
|
132
134
|
- ".github/workflows/gem-push.yml"
|
135
|
+
- ".github/workflows/rubocop.yml"
|
133
136
|
- ".gitignore"
|
134
137
|
- ".rubocop.yml"
|
135
|
-
- ".
|
138
|
+
- ".rubocop_todo.yml"
|
139
|
+
- Dockerfile
|
136
140
|
- Gemfile
|
137
141
|
- LICENSE
|
142
|
+
- Makefile
|
138
143
|
- README.md
|
139
144
|
- Rakefile
|
140
145
|
- default.yml
|
@@ -160,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
165
|
- !ruby/object:Gem::Version
|
161
166
|
version: '0'
|
162
167
|
requirements: []
|
163
|
-
|
164
|
-
rubygems_version: 2.7.6.3
|
168
|
+
rubygems_version: 3.1.6
|
165
169
|
signing_key:
|
166
170
|
specification_version: 4
|
167
171
|
summary: SCC style guides and shared style configs.
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5.8
|