rigortype 0.2.1 → 0.2.3
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/README.md +41 -14
- data/docs/handbook/01-getting-started.md +311 -0
- data/docs/handbook/02-everyday-types.md +337 -0
- data/docs/handbook/03-narrowing.md +359 -0
- data/docs/handbook/04-tuples-and-shapes.md +321 -0
- data/docs/handbook/05-methods-and-blocks.md +339 -0
- data/docs/handbook/06-classes.md +305 -0
- data/docs/handbook/07-rbs-and-extended.md +427 -0
- data/docs/handbook/08-understanding-errors.md +373 -0
- data/docs/handbook/09-plugins.md +241 -0
- data/docs/handbook/10-sorbet.md +347 -0
- data/docs/handbook/11-sig-gen.md +312 -0
- data/docs/handbook/12-lightweight-hkt.md +333 -0
- data/docs/handbook/README.md +275 -0
- data/docs/handbook/appendix-elixir.md +370 -0
- data/docs/handbook/appendix-go.md +399 -0
- data/docs/handbook/appendix-java-csharp.md +470 -0
- data/docs/handbook/appendix-liskov.md +580 -0
- data/docs/handbook/appendix-mypy.md +370 -0
- data/docs/handbook/appendix-phpstan.md +338 -0
- data/docs/handbook/appendix-protocols-and-structural-typing.md +292 -0
- data/docs/handbook/appendix-rust.md +446 -0
- data/docs/handbook/appendix-steep.md +336 -0
- data/docs/handbook/appendix-type-theory.md +1662 -0
- data/docs/handbook/appendix-typeprof.md +416 -0
- data/docs/handbook/appendix-typescript.md +332 -0
- data/docs/install.md +189 -0
- data/docs/llms.txt +72 -0
- data/docs/manual/01-installation.md +342 -0
- data/docs/manual/02-cli-reference.md +569 -0
- data/docs/manual/03-configuration.md +152 -0
- data/docs/manual/04-diagnostics.md +206 -0
- data/docs/manual/05-inspecting-types.md +109 -0
- data/docs/manual/06-baseline.md +104 -0
- data/docs/manual/07-plugins.md +92 -0
- data/docs/manual/08-skills.md +143 -0
- data/docs/manual/09-editor-integration.md +245 -0
- data/docs/manual/10-mcp-server.md +539 -0
- data/docs/manual/11-ci.md +274 -0
- data/docs/manual/12-caching.md +116 -0
- data/docs/manual/13-troubleshooting.md +120 -0
- data/docs/manual/14-rails-quickstart.md +332 -0
- data/docs/manual/15-type-protection-coverage.md +204 -0
- data/docs/manual/16-rbs-extended-annotations.md +190 -0
- data/docs/manual/17-driving-improvement.md +160 -0
- data/docs/manual/README.md +87 -0
- data/docs/manual/ci-templates/README.md +58 -0
- data/docs/manual/plugins/README.md +86 -0
- data/docs/manual/plugins/rigor-actioncable.md +78 -0
- data/docs/manual/plugins/rigor-actionmailer.md +74 -0
- data/docs/manual/plugins/rigor-actionpack.md +80 -0
- data/docs/manual/plugins/rigor-activejob.md +58 -0
- data/docs/manual/plugins/rigor-activerecord.md +102 -0
- data/docs/manual/plugins/rigor-activestorage.md +74 -0
- data/docs/manual/plugins/rigor-activesupport-core-ext.md +86 -0
- data/docs/manual/plugins/rigor-devise.md +70 -0
- data/docs/manual/plugins/rigor-dry-schema.md +56 -0
- data/docs/manual/plugins/rigor-dry-struct.md +60 -0
- data/docs/manual/plugins/rigor-dry-types.md +59 -0
- data/docs/manual/plugins/rigor-dry-validation.md +62 -0
- data/docs/manual/plugins/rigor-factorybot.md +76 -0
- data/docs/manual/plugins/rigor-graphql.md +89 -0
- data/docs/manual/plugins/rigor-hanami.md +83 -0
- data/docs/manual/plugins/rigor-mangrove.md +73 -0
- data/docs/manual/plugins/rigor-minitest.md +86 -0
- data/docs/manual/plugins/rigor-pundit.md +72 -0
- data/docs/manual/plugins/rigor-rails-i18n.md +92 -0
- data/docs/manual/plugins/rigor-rails-routes.md +94 -0
- data/docs/manual/plugins/rigor-rails.md +44 -0
- data/docs/manual/plugins/rigor-rbs-inline.md +83 -0
- data/docs/manual/plugins/rigor-rspec-rails.md +72 -0
- data/docs/manual/plugins/rigor-rspec.md +86 -0
- data/docs/manual/plugins/rigor-shoulda-matchers.md +78 -0
- data/docs/manual/plugins/rigor-sidekiq.md +78 -0
- data/docs/manual/plugins/rigor-sinatra.md +61 -0
- data/docs/manual/plugins/rigor-sorbet.md +63 -0
- data/docs/manual/plugins/rigor-statesman.md +75 -0
- data/docs/manual/plugins/rigor-typescript-utility-types.md +71 -0
- data/exe/rigor +1 -1
- data/lib/rigor/analysis/incremental_session.rb +4 -2
- data/lib/rigor/analysis/run_stats.rb +13 -1
- data/lib/rigor/analysis/runner.rb +54 -12
- data/lib/rigor/cli/check_command.rb +1 -1
- data/lib/rigor/cli/docs_command.rb +248 -0
- data/lib/rigor/cli/skill_command.rb +103 -41
- data/lib/rigor/cli/skill_describe.rb +346 -0
- data/lib/rigor/cli/triage_command.rb +8 -2
- data/lib/rigor/cli/triage_renderer.rb +4 -0
- data/lib/rigor/cli.rb +25 -3
- data/lib/rigor/inference/method_dispatcher/constant_folding.rb +124 -32
- data/lib/rigor/inference/method_dispatcher/shape_dispatch.rb +37 -6
- data/lib/rigor/inference/scope_indexer.rb +87 -89
- data/lib/rigor/plugin/isolation.rb +5 -5
- data/lib/rigor/plugin/loader.rb +4 -2
- data/lib/rigor/triage/catalogue.rb +16 -1
- data/lib/rigor/triage.rb +30 -7
- data/lib/rigor/version.rb +1 -1
- data/skills/rigor-ask/SKILL.md +172 -0
- data/skills/rigor-doctor/SKILL.md +87 -0
- data/skills/rigor-editor-setup/SKILL.md +114 -0
- data/skills/rigor-mcp-setup/SKILL.md +117 -0
- data/skills/rigor-monkeypatch-resolve/SKILL.md +79 -0
- data/skills/rigor-next-steps/SKILL.md +113 -0
- data/skills/rigor-plugin-tune/SKILL.md +79 -0
- data/skills/rigor-protection-uplift/SKILL.md +133 -0
- data/skills/rigor-rbs-setup/SKILL.md +128 -0
- data/skills/rigor-upgrade/SKILL.md +79 -0
- metadata +90 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Installing Rigor
|
|
2
|
+
|
|
3
|
+
Rigor is a tool, not a library. Like a linter or a compiler, it
|
|
4
|
+
analyses your project but is not part of its runtime. **Do not add
|
|
5
|
+
it to your application's `Gemfile`.** A `Gemfile` entry would tie
|
|
6
|
+
your whole project to Rigor's Ruby version and pull Rigor's
|
|
7
|
+
dependencies into your application's dependency resolution. Install
|
|
8
|
+
Rigor on its own and point it at your project.
|
|
9
|
+
|
|
10
|
+
Rigor runs on Ruby 4.0. That is independent of the Ruby your own
|
|
11
|
+
code targets: the `target_ruby:` config key tells Rigor which Ruby
|
|
12
|
+
*your* project runs, and the two need not match. Rigor reads your
|
|
13
|
+
project — its source, its `Gemfile.lock`, its gems' `.rbs` files —
|
|
14
|
+
as data; it never loads your project's gems into its own process,
|
|
15
|
+
so nothing is lost by installing it separately.
|
|
16
|
+
|
|
17
|
+
> **Using an AI coding agent?** It can install Rigor and configure
|
|
18
|
+
> the project for you — hand it this prompt:
|
|
19
|
+
>
|
|
20
|
+
> ```
|
|
21
|
+
> Install Rigor in this project by following the instructions at
|
|
22
|
+
> https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
23
|
+
> ```
|
|
24
|
+
>
|
|
25
|
+
> The agent detects your environment (mise / asdf / plain Ruby),
|
|
26
|
+
> installs the right tools, and hands off to the
|
|
27
|
+
> `rigor-project-init` skill (see Path A of the
|
|
28
|
+
> [Rails quickstart](14-rails-quickstart.md)). The channels below
|
|
29
|
+
> are the manual route.
|
|
30
|
+
|
|
31
|
+
### Set up in your language
|
|
32
|
+
|
|
33
|
+
The prompt above is plain natural language — your agent follows the
|
|
34
|
+
same linked instructions regardless of the language you ask in, so
|
|
35
|
+
the whole setup conversation can happen in your mother tongue. Each
|
|
36
|
+
ready-made prompt below explicitly asks the agent to work through the
|
|
37
|
+
setup interactively with you in that language:
|
|
38
|
+
|
|
39
|
+
<details data-lang-details>
|
|
40
|
+
<summary>Set up in your language</summary>
|
|
41
|
+
|
|
42
|
+
<details lang="ja"><summary>[ja] 日本語</summary>
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
日本語で対話しながら、このプロジェクトに Rigor をインストールする作業を一緒に進めてください。次の手順に従ってください:
|
|
46
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
</details>
|
|
50
|
+
|
|
51
|
+
<details lang="zh-Hans"><summary>[zh-Hans] 简体中文</summary>
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
请用简体中文与我互动,在此项目中安装 Rigor。请按照以下地址的说明操作:
|
|
55
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
</details>
|
|
59
|
+
|
|
60
|
+
<details lang="zh-Hant"><summary>[zh-Hant] 繁體中文</summary>
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
請用繁體中文與我互動,在此專案中安裝 Rigor。請依照以下網址的說明操作:
|
|
64
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
<details lang="ko"><summary>[ko] 한국어</summary>
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
한국어로 대화하면서 이 프로젝트에 Rigor를 설치하는 작업을 함께 진행해 주세요. 다음 주소의 안내를 따라 주세요:
|
|
73
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</details>
|
|
77
|
+
|
|
78
|
+
<details lang="pt-BR"><summary>[pt-BR] Português (Brasil)</summary>
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Vamos trabalhar juntos de forma interativa, em português brasileiro, para instalar o Rigor neste projeto. Siga as instruções em:
|
|
82
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</details>
|
|
86
|
+
|
|
87
|
+
<details lang="pt"><summary>[pt] Português</summary>
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Vamos trabalhar juntos de forma interativa, em português de Portugal, para instalar o Rigor neste projeto. Segue as instruções em:
|
|
91
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
</details>
|
|
95
|
+
|
|
96
|
+
<details lang="es"><summary>[es] Español</summary>
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Trabajemos juntos de forma interactiva, en español, para instalar Rigor en este proyecto. Sigue las instrucciones en:
|
|
100
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
<details lang="vi"><summary>[vi] Tiếng Việt</summary>
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Hãy trao đổi với tôi bằng tiếng Việt và cùng nhau cài đặt Rigor vào dự án này. Làm theo hướng dẫn tại:
|
|
109
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
</details>
|
|
113
|
+
|
|
114
|
+
<details lang="fr"><summary>[fr] Français</summary>
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Travaillons ensemble de manière interactive, en français, pour installer Rigor dans ce projet. Suivez les instructions à l'adresse :
|
|
118
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
</details>
|
|
122
|
+
|
|
123
|
+
<details lang="de"><summary>[de] Deutsch</summary>
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Lassen Sie uns interaktiv auf Deutsch zusammenarbeiten, um Rigor in diesem Projekt zu installieren. Folgen Sie den Anweisungen unter diesem Link:
|
|
127
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
</details>
|
|
131
|
+
|
|
132
|
+
<details lang="it"><summary>[it] Italiano</summary>
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Lavoriamo insieme in modo interattivo, in italiano, per installare Rigor in questo progetto. Segui le istruzioni a questo link:
|
|
136
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details lang="th"><summary>[th] ภาษาไทย</summary>
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
มาทำงานร่วมกันแบบโต้ตอบเป็นภาษาไทย เพื่อติดตั้ง Rigor ในโปรเจกต์นี้ โปรดทำตามคำแนะนำที่ลิงก์ต่อไปนี้:
|
|
145
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
<details lang="id"><summary>[id] Bahasa Indonesia</summary>
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Mari bekerja sama secara interaktif dalam bahasa Indonesia untuk memasang Rigor pada proyek ini. Ikuti instruksi pada tautan berikut:
|
|
154
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
</details>
|
|
158
|
+
|
|
159
|
+
<details lang="pl"><summary>[pl] Polski</summary>
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Pracujmy razem po polsku, w trybie interaktywnym, aby zainstalować Rigor w tym projekcie. Postępuj zgodnie z instrukcjami pod adresem:
|
|
163
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
</details>
|
|
167
|
+
|
|
168
|
+
<details lang="uk"><summary>[uk] Українська</summary>
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
Працюймо разом українською мовою в інтерактивному режимі, щоб встановити Rigor у цьому проєкті. Дотримуйтеся інструкцій за посиланням:
|
|
172
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
</details>
|
|
176
|
+
|
|
177
|
+
<details lang="ru"><summary>[ru] Русский</summary>
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Давайте работать вместе в интерактивном режиме на русском языке, чтобы установить Rigor в этом проекте. Следуйте инструкциям по ссылке:
|
|
181
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
</details>
|
|
185
|
+
|
|
186
|
+
<details lang="ro"><summary>[ro] Română</summary>
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
Haideți să lucrăm împreună în mod interactiv, în limba română, pentru a instala Rigor în acest proiect. Urmați instrucțiunile de la adresa:
|
|
190
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
</details>
|
|
194
|
+
|
|
195
|
+
<details lang="tr"><summary>[tr] Türkçe</summary>
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Türkçe iletişim kurarak bu projeye Rigor'u birlikte kuralım. Şu adresteki talimatları izleyin:
|
|
199
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
</details>
|
|
203
|
+
|
|
204
|
+
<details lang="ar" dir="rtl"><summary>[ar] العربية</summary>
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
لنعمل معًا بشكل تفاعلي وباللغة العربية لتثبيت Rigor في هذا المشروع. اتبع التعليمات الموجودة في:
|
|
208
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
</details>
|
|
212
|
+
|
|
213
|
+
<details lang="fa" dir="rtl"><summary>[fa] فارسی</summary>
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
بیایید بهصورت تعاملی و به زبان فارسی با هم کار کنیم تا Rigor را در این پروژه نصب کنیم. دستورالعملهای موجود در این آدرس را دنبال کنید:
|
|
217
|
+
https://raw.githubusercontent.com/rigortype/rigor/refs/heads/master/docs/install.md
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
</details>
|
|
221
|
+
|
|
222
|
+
</details>
|
|
223
|
+
|
|
224
|
+
## Recommended — a runtime version manager
|
|
225
|
+
|
|
226
|
+
[`mise`](https://mise.jdx.dev/) is a runtime / tool version manager
|
|
227
|
+
(think `rbenv` + `nvm` plus a package runner in one). It installs
|
|
228
|
+
Ruby 4.0 and Rigor together and pins them per project, with no
|
|
229
|
+
`Gemfile` involvement.
|
|
230
|
+
|
|
231
|
+
### New to mise?
|
|
232
|
+
|
|
233
|
+
After [installing mise itself](https://mise.jdx.dev/getting-started.html),
|
|
234
|
+
two commands set Rigor up:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
mise use ruby@4.0
|
|
238
|
+
mise use gem:rigortype
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
A few things worth knowing if you have not used mise before:
|
|
242
|
+
|
|
243
|
+
- **`mise use` is project-level.** It writes a `mise.toml` in the
|
|
244
|
+
*current directory* recording the chosen versions, and installs
|
|
245
|
+
the tools as part of the same command — there is no separate
|
|
246
|
+
install step. (mise also reads the asdf-style `.tool-versions`.)
|
|
247
|
+
- **Commit the config to share versions.** Check the generated
|
|
248
|
+
`mise.toml` into Git so every contributor — and every CI run —
|
|
249
|
+
resolves the same Ruby 4.0 and the same Rigor version.
|
|
250
|
+
- **For a machine-wide install, add `-g`.** `mise use -g
|
|
251
|
+
gem:rigortype` writes mise's global config
|
|
252
|
+
(`~/.config/mise/config.toml`) instead of a project `mise.toml`,
|
|
253
|
+
making `rigor` available in every directory.
|
|
254
|
+
|
|
255
|
+
The gem is `rigortype`; the executable it installs (and the only
|
|
256
|
+
command you run) is `rigor`.
|
|
257
|
+
|
|
258
|
+
### Putting `rigor` on your PATH
|
|
259
|
+
|
|
260
|
+
Installing the tool is not enough on its own — `rigor` reaches your
|
|
261
|
+
`PATH` only once mise is wired into your environment, and this holds
|
|
262
|
+
for both project-level and global installs. mise's
|
|
263
|
+
[shims guide](https://mise.jdx.dev/dev-tools/shims.html) explains
|
|
264
|
+
the two mechanisms:
|
|
265
|
+
|
|
266
|
+
- **`mise activate`** — add `eval "$(mise activate zsh)"` to your
|
|
267
|
+
shell rc (`~/.zshrc`; bash and fish equivalents are in
|
|
268
|
+
[mise's docs](https://mise.jdx.dev/getting-started.html)).
|
|
269
|
+
`cd`-ing into the project then puts `rigor` on `PATH`. Best for
|
|
270
|
+
interactive shells.
|
|
271
|
+
- **shims** — fixed executables under `~/.local/share/mise/shims`.
|
|
272
|
+
Add that directory to `PATH`:
|
|
273
|
+
|
|
274
|
+
```sh
|
|
275
|
+
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
or run `mise activate <shell> --shims`. Shims work where the `cd`
|
|
279
|
+
hook never fires — editors launching `rigor lsp`, scripts, some
|
|
280
|
+
CI. mise creates the `rigor` shim automatically on install.
|
|
281
|
+
|
|
282
|
+
Until mise is wired in either way, you can still run Rigor
|
|
283
|
+
explicitly with `mise exec gem:rigortype -- rigor`. See
|
|
284
|
+
[Editor integration](09-editor-integration.md) for the editor
|
|
285
|
+
side.
|
|
286
|
+
|
|
287
|
+
## asdf
|
|
288
|
+
|
|
289
|
+
`asdf` follows the same model. Install a Ruby 4.0.x with the
|
|
290
|
+
[`asdf-ruby`](https://github.com/asdf-vm/asdf-ruby) plugin, select
|
|
291
|
+
it for the project, then install the gem into that Ruby:
|
|
292
|
+
|
|
293
|
+
```sh
|
|
294
|
+
asdf install ruby latest:4.0
|
|
295
|
+
asdf local ruby latest:4.0
|
|
296
|
+
gem install rigortype
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
`asdf` has no general-purpose gem backend, so the gem itself is
|
|
300
|
+
installed with `gem install` rather than an `asdf` command. `mise`
|
|
301
|
+
(above) is the more integrated option because its `gem:` backend
|
|
302
|
+
pins the gem the same way it pins Ruby.
|
|
303
|
+
|
|
304
|
+
## Simple alternative — gem install
|
|
305
|
+
|
|
306
|
+
If you already have a Ruby 4.0 on your `PATH`:
|
|
307
|
+
|
|
308
|
+
```sh
|
|
309
|
+
gem install rigortype
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
The gem is named `rigortype` — `rigor` was already taken on
|
|
313
|
+
RubyGems — and the executable it installs is `rigor`. This is the
|
|
314
|
+
quickest path, but it records nothing per project: a version
|
|
315
|
+
manager keeps the Rigor version pinned next to the project, so
|
|
316
|
+
local runs and CI cannot drift apart.
|
|
317
|
+
|
|
318
|
+
## Nix
|
|
319
|
+
|
|
320
|
+
If you use Nix, Rigor's flake exposes the executable as a package,
|
|
321
|
+
with Ruby 4.0 in its closure — nothing else need be on the host:
|
|
322
|
+
|
|
323
|
+
```sh
|
|
324
|
+
# Run without installing:
|
|
325
|
+
nix run github:rigortype/rigor#rigor -- check
|
|
326
|
+
|
|
327
|
+
# Or install it into your profile:
|
|
328
|
+
nix profile install github:rigortype/rigor
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## Developing inside a container
|
|
332
|
+
|
|
333
|
+
If you develop inside a dev container, install Rigor on the **host
|
|
334
|
+
OS** rather than inside the container — running the analyser across
|
|
335
|
+
the container's filesystem and process boundary adds overhead. On
|
|
336
|
+
Windows, where a host-side Ruby 4.0 is harder to provide, installing
|
|
337
|
+
Rigor inside the container is the better choice.
|
|
338
|
+
|
|
339
|
+
## Continuous integration
|
|
340
|
+
|
|
341
|
+
Wiring Rigor into CI has its own chapter — see
|
|
342
|
+
[Running Rigor in CI](11-ci.md).
|