solargraph-rails 1.1.2 → 1.2.0
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/workflows/overcommit.yml +71 -0
- data/.github/workflows/rubocop.yml +31 -0
- data/.github/workflows/ruby.yml +122 -27
- data/.github/workflows/typecheck.yml +81 -0
- data/.overcommit.yml +51 -0
- data/.rubocop.yml +327 -0
- data/.rubocop_todo.yml +857 -0
- data/.solargraph.yml +5 -2
- data/CHANGELOG.md +36 -1
- data/DEVELOPMENT.md +8 -19
- data/Gemfile +20 -8
- data/README.md +38 -25
- data/bin/overcommit +27 -0
- data/bin/rubocop +27 -0
- data/ci/auto_yard/plugins.rb +0 -1
- data/lib/solargraph/rails/annotate.rb +10 -0
- data/lib/solargraph/rails/annotations/action_controller.rb +57 -5
- data/lib/solargraph/rails/annotations/active_model.rb +18 -0
- data/lib/solargraph/rails/annotations/active_record.rb +24 -3
- data/lib/solargraph/rails/annotations/active_support.rb +3 -0
- data/lib/solargraph/rails/annotations/array.rb +3 -0
- data/lib/solargraph/rails/annotations/class.rb +2 -0
- data/lib/solargraph/rails/annotations/module.rb +13 -0
- data/lib/solargraph/rails/annotations/object.rb +3 -0
- data/lib/solargraph/rails/annotations/time.rb +3 -3
- data/lib/solargraph/rails/delegate.rb +44 -10
- data/lib/solargraph/rails/model.rb +252 -31
- data/lib/solargraph/rails/rails_api.rb +2 -2
- data/lib/solargraph/rails/schema.rb +27 -8
- data/lib/solargraph/rails/util.rb +45 -4
- data/lib/solargraph/rails/version.rb +1 -1
- data/lib/solargraph-rails.rb +1 -1
- data/script/generate_definitions.rb +49 -24
- data/solargraph-rails.gemspec +20 -5
- metadata +60 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5805a34ade746eabc3ae7e5f304bd695b19fb2ec997f0fa436530c4954f26e94
|
4
|
+
data.tar.gz: a4bc0f6c610f76165cddf26f27e8eefecb0996ac9c836bbc1c9e24a8b3df5ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca807080c14c79a539f2452d63bebb57d9b977598b9df5e02d53048a0be03cf644a1a81b322b09e55dee2d07657973f60c5a856c1b167b622e2f17f9192c4994
|
7
|
+
data.tar.gz: cc1901a6eab796d45178d5b4f06e8339edd422a61123e2c20f1580d48d9778d83e6c2d600f02ae76067b535e81e10b705c702ac706a0e924b4500171241b087c
|
@@ -0,0 +1,71 @@
|
|
1
|
+
---
|
2
|
+
# To debug locally:
|
3
|
+
# npm install -g act
|
4
|
+
# act pull_release -j overcommit
|
5
|
+
#
|
6
|
+
|
7
|
+
name: Overcommit
|
8
|
+
|
9
|
+
on:
|
10
|
+
workflow_dispatch: {}
|
11
|
+
pull_request:
|
12
|
+
branches: [main]
|
13
|
+
push:
|
14
|
+
branches:
|
15
|
+
- 'main'
|
16
|
+
tags:
|
17
|
+
- 'v*'
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
overcommit:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
strategy:
|
23
|
+
matrix:
|
24
|
+
versions:
|
25
|
+
# ruby 3.2 is minimum Ruby supported by Rails 8.0
|
26
|
+
- ruby: "3.2"
|
27
|
+
rails-major: "8"
|
28
|
+
rails-minor: "0"
|
29
|
+
run_coverage: true
|
30
|
+
solargraph-version:
|
31
|
+
- "0.56.alpha"
|
32
|
+
fail-fast: false
|
33
|
+
steps:
|
34
|
+
- uses: actions/checkout@v2
|
35
|
+
# Number of commits to fetch. 0 indicates all history for all branches and tags.
|
36
|
+
with:
|
37
|
+
fetch-depth: 0
|
38
|
+
|
39
|
+
- uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
ruby-version: 3.4
|
42
|
+
bundler: latest
|
43
|
+
bundler-cache: true
|
44
|
+
cache-version: ${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}-2025-06-06
|
45
|
+
env:
|
46
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
47
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
48
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
49
|
+
|
50
|
+
- name: Restore cache of gem annotations
|
51
|
+
id: dot-cache-restore
|
52
|
+
uses: actions/cache/restore@v4
|
53
|
+
with:
|
54
|
+
key: |
|
55
|
+
2025-06-26-09-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}--${{ matrix.versions.rails-minor }}-${{ hashFiles('spec/**/Gemfile.lock') }}-${{ hashFiles('Gemfile.lock') }}
|
56
|
+
restore-keys: |
|
57
|
+
2025-06-26-09-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-${{ matrix.versions.rails-minor }}-${{ hashFiles('spec/**/Gemfile.lock') }}-
|
58
|
+
2025-06-26-09-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-${{ matrix.versions.rails-minor }}-
|
59
|
+
2025-06-26-09-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-
|
60
|
+
2025-06-26-09-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-
|
61
|
+
path: |
|
62
|
+
/home/runner/.cache/solargraph
|
63
|
+
|
64
|
+
- name: Overcommit
|
65
|
+
run: |
|
66
|
+
bundle exec overcommit --sign
|
67
|
+
bundle exec overcommit --run --diff origin/main
|
68
|
+
env:
|
69
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
70
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
71
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# npm install -g act
|
2
|
+
# act pull_release -j 'runner / rubocop'
|
3
|
+
---
|
4
|
+
name: reviewdog
|
5
|
+
on:
|
6
|
+
pull_request:
|
7
|
+
permissions:
|
8
|
+
contents: read
|
9
|
+
pull-requests: write
|
10
|
+
jobs:
|
11
|
+
rubocop:
|
12
|
+
name: runner / rubocop
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
env:
|
15
|
+
BUNDLE_ONLY: rubocop
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
18
|
+
- uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # v1.227.0
|
19
|
+
with:
|
20
|
+
ruby-version: '3.3'
|
21
|
+
bundler-cache: true
|
22
|
+
- uses: reviewdog/action-rubocop@fcb74ba274da10b18d038d0bcddaae3518739634 # v2.21.2
|
23
|
+
with:
|
24
|
+
reporter: github-pr-review # Default is github-pr-check
|
25
|
+
skip_install: true
|
26
|
+
use_bundler: true
|
27
|
+
rubocop_extensions: 'rubocop-performance:gemfile rubocop-rspec:gemfile rubocop-rake:gemfile'
|
28
|
+
fail_on_error: true
|
29
|
+
fail_level: info
|
30
|
+
rubocop_version: Gemfile
|
31
|
+
level: info
|
data/.github/workflows/ruby.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# To debug locally:
|
2
2
|
# npm install -g act
|
3
|
-
# act
|
3
|
+
# act pull_request
|
4
4
|
#
|
5
5
|
|
6
6
|
name: Ruby
|
@@ -9,56 +9,116 @@ on:
|
|
9
9
|
workflow_dispatch: {}
|
10
10
|
pull_request:
|
11
11
|
branches: [main]
|
12
|
+
push:
|
13
|
+
branches:
|
14
|
+
- 'main'
|
15
|
+
tags:
|
16
|
+
- 'v*'
|
12
17
|
|
13
18
|
jobs:
|
14
19
|
test:
|
15
20
|
runs-on: ubuntu-latest
|
16
21
|
strategy:
|
17
22
|
matrix:
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
#
|
23
|
+
versions:
|
24
|
+
# ruby 2.7 is minimum Ruby supported by Rails 7.0
|
25
|
+
- ruby: "3.0"
|
26
|
+
rails-major: "7"
|
27
|
+
rails-minor: "0"
|
28
|
+
# ruby 2.7 is minimum Ruby supported by Rails 7.1
|
29
|
+
- ruby: "3.0"
|
30
|
+
rails-major: "7"
|
31
|
+
rails-minor: "1"
|
32
|
+
# ruby 3.1 is minimum Ruby supported by Rails 7.2
|
33
|
+
- ruby: "3.1"
|
34
|
+
rails-major: "7"
|
35
|
+
rails-minor: "2"
|
36
|
+
# # ruby 3.2 is minimum Ruby supported by Rails 8.0
|
37
|
+
- ruby: "3.2"
|
38
|
+
rails-major: "8"
|
39
|
+
rails-minor: "0"
|
24
40
|
solargraph-version:
|
25
41
|
- "0.48.0"
|
26
42
|
- "0.49.0"
|
27
43
|
- "0.50.0"
|
28
44
|
- "0.51.2"
|
29
45
|
- "0.52.0"
|
30
|
-
- "0.
|
31
|
-
|
32
|
-
|
46
|
+
- "0.56.alpha"
|
47
|
+
- "0.56.0"
|
48
|
+
include:
|
49
|
+
- versions:
|
50
|
+
ruby: "3.2"
|
51
|
+
rails-major: "8"
|
52
|
+
rails-minor: "0"
|
53
|
+
solargraph-version: "0.56.alpha"
|
54
|
+
run_coverage: true
|
33
55
|
fail-fast: false
|
34
|
-
|
35
56
|
steps:
|
36
57
|
- uses: actions/checkout@v2
|
58
|
+
|
37
59
|
- uses: ruby/setup-ruby@v1
|
38
60
|
with:
|
39
|
-
ruby-version: ${{ matrix.ruby
|
61
|
+
ruby-version: ${{ matrix.versions.ruby }}
|
40
62
|
bundler: latest
|
41
63
|
bundler-cache: true
|
42
|
-
|
64
|
+
cache-version: ${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}-2025-06-06
|
65
|
+
env:
|
66
|
+
# Used in Gemfile/gemspec
|
67
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
68
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
69
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
43
70
|
|
44
71
|
- name: Install child bundle
|
45
72
|
run: |
|
46
73
|
set -x
|
47
|
-
|
48
|
-
|
49
|
-
|
74
|
+
# same as used by ruby/setup-ruby
|
75
|
+
BUNDLE_PATH="${GITHUB_WORKSPACE:?}/vendor/bundle"
|
76
|
+
export BUNDLE_PATH
|
77
|
+
RAILS_DIR="${GITHUB_WORKSPACE:?}/spec/rails${{ matrix.versions.rails-major }}"
|
78
|
+
export RAILS_DIR
|
79
|
+
cd ${RAILS_DIR}
|
50
80
|
bundle install
|
81
|
+
# these solargraphs use rbs versions that are too old - and
|
82
|
+
# don't pay attention to the rbs collection regardless
|
83
|
+
if [[ "$MATRIX_SOLARGRAPH_VERSION" != "0.48.0" && "$MATRIX_SOLARGRAPH_VERSION" != "0.49.0" && "$MATRIX_SOLARGRAPH_VERSION" != "0.50.0" ]]
|
84
|
+
then
|
85
|
+
bundle exec --gemfile ../../Gemfile rbs --version
|
86
|
+
bundle exec --gemfile ../../Gemfile rbs collection install
|
87
|
+
fi
|
88
|
+
cd ../..
|
89
|
+
env:
|
90
|
+
# Used in Gemfile/gemspec
|
91
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
92
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
93
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
51
94
|
|
52
|
-
- name: cache gem annotations
|
53
|
-
|
54
|
-
|
95
|
+
- name: Restore cache of gem annotations
|
96
|
+
id: dot-cache-restore
|
97
|
+
uses: actions/cache/restore@v4
|
55
98
|
with:
|
56
|
-
key:
|
99
|
+
key: |
|
100
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}--${{ matrix.versions.rails-minor }}-${{ hashFiles('spec/**/Gemfile.lock') }}-${{ hashFiles('Gemfile.lock') }}
|
101
|
+
restore-keys: |
|
102
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-${{ matrix.versions.rails-minor }}-${{ hashFiles('spec/**/Gemfile.lock') }}-
|
103
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-${{ matrix.versions.rails-minor }}-
|
104
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}-
|
105
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-
|
57
106
|
path: |
|
58
|
-
/home/runner/.cache
|
107
|
+
/home/runner/.cache/solargraph
|
59
108
|
|
60
109
|
- name: bundle list
|
61
|
-
run:
|
110
|
+
run: |
|
111
|
+
# same as used by ruby/setup-ruby
|
112
|
+
BUNDLE_PATH="${GITHUB_WORKSPACE:?}/vendor/bundle"
|
113
|
+
export BUNDLE_PATH
|
114
|
+
RAILS_DIR="${GITHUB_WORKSPACE:?}/spec/rails${{ matrix.versions.rails-major }}"
|
115
|
+
export RAILS_DIR
|
116
|
+
bundle list && cat Gemfile.lock && find vendor -name Gemfile
|
117
|
+
env:
|
118
|
+
# Used in Gemfile/gemspec
|
119
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
120
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
121
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
62
122
|
|
63
123
|
#- name: Setup upterm session
|
64
124
|
# uses: lhotari/action-upterm@v1
|
@@ -66,11 +126,46 @@ jobs:
|
|
66
126
|
- name: RSpec
|
67
127
|
run: |
|
68
128
|
set -x
|
69
|
-
|
70
|
-
|
71
|
-
export BUNDLE_PATH
|
129
|
+
# same as used by ruby/setup-ruby
|
130
|
+
BUNDLE_PATH="${GITHUB_WORKSPACE:?}/vendor/bundle"
|
131
|
+
export BUNDLE_PATH
|
132
|
+
RAILS_DIR="${GITHUB_WORKSPACE:?}/spec/rails${{ matrix.versions.rails-major }}"
|
133
|
+
export RAILS_DIR
|
72
134
|
ruby --version
|
73
135
|
bundle install
|
74
|
-
bundle
|
136
|
+
bundle update solargraph
|
75
137
|
bundle exec solargraph version
|
76
|
-
bundle
|
138
|
+
bundle info solargraph
|
139
|
+
set +e
|
140
|
+
bundle info rbs
|
141
|
+
set -e
|
142
|
+
bundle info yard
|
143
|
+
bundle exec rake spec # bundle exec rspec spec/solargraph-rails
|
144
|
+
env:
|
145
|
+
# Used in Gemfile/gemspec
|
146
|
+
MATRIX_SOLARGRAPH_VERSION: ${{ matrix.solargraph-version }}
|
147
|
+
MATRIX_RAILS_VERSION: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
148
|
+
MATRIX_RAILS_MAJOR_VERSION: ${{ matrix.versions.rails-major }}
|
149
|
+
|
150
|
+
- name: Upload coverage artifacts
|
151
|
+
uses: actions/upload-artifact@v4
|
152
|
+
with:
|
153
|
+
name: coverage-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}
|
154
|
+
path: coverage
|
155
|
+
|
156
|
+
- name: Code coverage check
|
157
|
+
uses: apiology/reviewdog-action-code-coverage@add_options
|
158
|
+
with:
|
159
|
+
lcov_path: ./coverage/lcov/*.lcov
|
160
|
+
fail_level: warning
|
161
|
+
if: matrix.run_coverage && github.event_name == 'pull_request'
|
162
|
+
|
163
|
+
- name: Cache gem annotations
|
164
|
+
id: dot-cache-save
|
165
|
+
if: always() && steps.dot-cache-restore.outputs.cache-hit != 'true'
|
166
|
+
uses: actions/cache/save@v4
|
167
|
+
with:
|
168
|
+
key: |
|
169
|
+
2025-06-29-${{ runner.os }}-dot-cache-${{ matrix.solargraph-version }}-${{ matrix.versions.rails-major }}--${{ matrix.versions.rails-minor }}-${{ hashFiles('spec/**/Gemfile.lock') }}-${{ hashFiles('Gemfile.lock') }}
|
170
|
+
path: |
|
171
|
+
/home/runner/.cache/solargraph
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
# To debug locally:
|
3
|
+
# npm install -g act
|
4
|
+
# act pull_request
|
5
|
+
#
|
6
|
+
|
7
|
+
name: Typecheck
|
8
|
+
|
9
|
+
on:
|
10
|
+
workflow_dispatch: {}
|
11
|
+
pull_request:
|
12
|
+
branches: [main]
|
13
|
+
push:
|
14
|
+
branches:
|
15
|
+
- 'main'
|
16
|
+
tags:
|
17
|
+
- 'v*'
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
typecheck:
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: 3.4
|
28
|
+
bundler: latest
|
29
|
+
bundler-cache: true
|
30
|
+
cache-version: ${{ matrix.versions.rails-major }}.${{ matrix.versions.rails-minor }}-2025-06-06
|
31
|
+
env:
|
32
|
+
MATRIX_RAILS_MAJOR_VERSION: "8"
|
33
|
+
MATRIX_RAILS_VERSION: "8.0"
|
34
|
+
|
35
|
+
- name: Restore cache of gem annotations
|
36
|
+
id: dot-cache-restore
|
37
|
+
uses: actions/cache/restore@v4
|
38
|
+
with:
|
39
|
+
key: |
|
40
|
+
${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }}
|
41
|
+
restore-keys: |
|
42
|
+
${{ runner.os }}-dot-cache-
|
43
|
+
path: |
|
44
|
+
/home/runner/.cache/solargraph
|
45
|
+
|
46
|
+
- name: bundle list
|
47
|
+
run: |
|
48
|
+
# same as used by ruby/setup-ruby
|
49
|
+
BUNDLE_PATH="${GITHUB_WORKSPACE:?}/vendor/bundle"
|
50
|
+
export BUNDLE_PATH
|
51
|
+
bundle list && cat Gemfile.lock && find vendor -name Gemfile
|
52
|
+
env:
|
53
|
+
MATRIX_RAILS_MAJOR_VERSION: "8"
|
54
|
+
MATRIX_RAILS_VERSION: "8.0"
|
55
|
+
|
56
|
+
#- name: Setup upterm session
|
57
|
+
# uses: lhotari/action-upterm@v1
|
58
|
+
|
59
|
+
- name: Typecheck
|
60
|
+
run: |
|
61
|
+
set -x
|
62
|
+
# same as used by ruby/setup-ruby
|
63
|
+
ruby --version
|
64
|
+
bundle install
|
65
|
+
bundle update solargraph
|
66
|
+
bundle exec solargraph version
|
67
|
+
# SOLARGRAPH_ASSERTS=on
|
68
|
+
bundle exec solargraph typecheck --level typed
|
69
|
+
env:
|
70
|
+
MATRIX_RAILS_MAJOR_VERSION: "8"
|
71
|
+
MATRIX_RAILS_VERSION: "8.0"
|
72
|
+
|
73
|
+
- name: Cache gem annotations
|
74
|
+
id: dot-cache-save
|
75
|
+
if: always() && steps.dot-cache-restore.outputs.cache-hit != 'true'
|
76
|
+
uses: actions/cache/save@v4
|
77
|
+
with:
|
78
|
+
key: |
|
79
|
+
${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }}
|
80
|
+
path: |
|
81
|
+
/home/runner/.cache/solargraph
|
data/.overcommit.yml
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
# Use this file to configure the Overcommit hooks you wish to use. This will
|
3
|
+
# extend the default configuration defined in:
|
4
|
+
# https://github.com/sds/overcommit/blob/master/config/default.yml
|
5
|
+
#
|
6
|
+
# At the topmost level of this YAML file is a key representing type of hook
|
7
|
+
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
|
8
|
+
# customize each hook, such as whether to only run it on certain files (via
|
9
|
+
# `include`), whether to only display output if it fails (via `quiet`), etc.
|
10
|
+
#
|
11
|
+
# For a complete list of hooks, see:
|
12
|
+
# https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
|
13
|
+
#
|
14
|
+
# For a complete list of options that you can use to customize hooks, see:
|
15
|
+
# https://github.com/sds/overcommit#configuration
|
16
|
+
#
|
17
|
+
# Uncomment the following lines to make the configuration take effect.
|
18
|
+
|
19
|
+
PreCommit:
|
20
|
+
RuboCop:
|
21
|
+
enabled: true
|
22
|
+
on_warn: fail # Treat all warnings as failures
|
23
|
+
|
24
|
+
Solargraph:
|
25
|
+
enabled: true
|
26
|
+
exclude:
|
27
|
+
- 'spec/**/*'
|
28
|
+
- lib/solargraph/rails/annotations/**/*
|
29
|
+
- vendor/**/*
|
30
|
+
- ".bundle/**/*"
|
31
|
+
|
32
|
+
# creates false positives in CI
|
33
|
+
AuthorName:
|
34
|
+
enabled: false
|
35
|
+
|
36
|
+
# creates false positives in CI
|
37
|
+
AuthorEmail:
|
38
|
+
enabled: false
|
39
|
+
|
40
|
+
#
|
41
|
+
# TrailingWhitespace:
|
42
|
+
# enabled: true
|
43
|
+
# exclude:
|
44
|
+
# - '**/db/structure.sql' # Ignore trailing whitespace in generated files
|
45
|
+
#
|
46
|
+
#PostCheckout:
|
47
|
+
# ALL: # Special hook name that customizes all hooks of this type
|
48
|
+
# quiet: true # Change all post-checkout hooks to only display output on failure
|
49
|
+
#
|
50
|
+
# IndexTags:
|
51
|
+
# enabled: true # Generate a tags file with `ctags` each time HEAD changes
|