sonicop 26.8.112-aarch64-linux → 26.9.100-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1cab35205ef1b9545aa27aae10b033f94a6ef4285ad74f0f8439176570517ea
4
- data.tar.gz: 8fa47739e28ec78bcd4ad740ffa2afdb4069a6fc673c9b11ef56f6a9ee6802fc
3
+ metadata.gz: cb2e48b52a313f6e407570886d1caa2b395008807ab1cc815038b3654c958d45
4
+ data.tar.gz: 8044e6af7d35a48b74f453b67f040ea74722481cad4f6209f0309ee38f42d596
5
5
  SHA512:
6
- metadata.gz: ee256fff60b527f0baf546b06a61ee57c0f12f3e4bdc25d109972a2376d8f723f66918de47b2c7c26305347c39be451c09422d37cb4d251e7abb4e9bce1ff7fa
7
- data.tar.gz: 783be95e866e2ec1eeef816e1bd42500b01ff3d0b200073246d2c5e128fb80bd6722920c18d2591d2eb86eb0deb7928962baa9a3edc7d1c83f47352b59a9cde4
6
+ metadata.gz: bd059ae5244f8fb9c5bced34991545112fcfeed1e23c3ac047b40d124466970454e464101f0edb25cf569988cba8f99979bdbba470d2635f3981cb312d06f435
7
+ data.tar.gz: 2f5b6d5153e7b4e9017ea52d5b7ce575bfad1d2c91ce48eb919ae2c75fc64554665e3b30d5e9f6d65f5d416f40c661e0c700a76d65bee65a8aa94b1bec2d8a11
data/README.ja.md CHANGED
@@ -153,6 +153,8 @@ sonicop --show-cops
153
153
  `AllCops/DisabledByDefault`、`Include`/`Exclude`、Cop ごとの `Enabled`、`Exclude`、
154
154
  `Severity`、`Safe`、`SafeAutoCorrect` と設定値に対応します。宣言されたプラグイン由来の
155
155
  Cop は「認識済み・未実装」として受理し、Ruby プラグインコード自体は実行しません。
156
+ リモート設定のリクエストには 30 秒のネットワークタイムアウトを設け、応答は 1 件あたり
157
+ 5 MiB に制限します。
156
158
 
157
159
  ```yaml
158
160
  inherit_from: .rubocop_todo.yml
@@ -229,52 +231,63 @@ autocorrect は RuboCop 自身のツリーと Mastodon でバイト単位に一
229
231
  既定の実行はどちらの群にも届きません。)
230
232
  各値は暖機後 2 回の最速値です。
231
233
 
232
- | コーパス | ファイル | RuboCop 並列 | Sonicop 並列 | RuboCop 単一 | Sonicop 単一 |
233
- |---|---:|---:|---:|---:|---:|
234
- | rubocop/rubocop | 1,765 | 12.71 秒 | **4.59 秒** | 42.74 秒 | **13.75 秒** |
235
- | mastodon/mastodon | 3,290 | 29.95 秒 | **6.48 秒** | 37.60 秒 | **15.88 秒** |
236
- | Homebrew/brew | 2,179 | 18.20 秒 | **4.31 秒** | 38.72 秒 | **11.67 秒** |
237
- | rails/rails | 3,551 | 52.55 秒 | **16.88 秒** | 162.55 秒 | **63.97 秒** |
238
- | ruby/ruby | 7,466 | 132.17 秒 | **43.10 秒** | 199.78 秒 | **76.07 秒** |
234
+ | コーパス | ファイル | offense | RuboCop 並列 | Sonicop 並列 | RuboCop 単一 | Sonicop 単一 |
235
+ |---|---:|---:|---:|---:|---:|---:|
236
+ | rubocop/rubocop | 1,780 | 5,826 | 10.85 秒 | **1.53 秒** | 41.44 秒 | **8.96 秒** |
237
+ | mastodon/mastodon | 3,292 | 15,293 | 22.59 秒 | **3.04 秒** | 34.74 秒 | **6.86 秒** |
238
+ | Homebrew/brew | 2,296 | 51,527 | 13.56 秒 | **2.21 秒** | 40.36 秒 | **6.51 秒** |
239
+ | rails/rails | 3,562 | 168,615 | 32.90 秒 | **8.84 秒** | 85.71 秒 | **19.17 秒** |
240
+ | ruby/ruby | 7,477 | 765,975 | 86.89 秒 | **15.59 秒** | 193.59 秒 | **37.98 秒** |
239
241
 
240
- 差は並列で 2.8〜4.6 倍、単一プロセスで 2.4〜3.3 倍と幅があり、1 コーパスでは代表できません。
242
+ 差は並列で 3.7〜7.4 倍、単一プロセスで 4.5〜6.2 倍と幅があり、1 コーパスでは代表できません。
241
243
  **単一プロセスの列を読み、並列は目安として扱ってください。** 同じ 2 つのバイナリを 1 日に
242
244
  3 回測ったところ、単一プロセスの値は毎回 16% 以内に収まったのに対し、RuboCop 自身のツリーでの
243
245
  並列の倍率は、マシンが他に何をしていたかだけで 3.3 倍から 9.2 倍まで動きました。単一プロセスは
244
246
  エンジンを測っていますが、並列はエンジンに加えて「その実行でスケジューリングがそのツリーに
245
247
  どれだけ噛み合ったか」を測っています。
246
248
 
247
- 仕事を省いて速いわけではありません。この同じ 394 Cop について、RuboCop 自身のツリー・
248
- Rails・Mastodon の 3 つで**すべての offense が一致**します(計 188,812 件、どちらの側にも
249
- 残りません)。autocorrect は前者と後者でバイト単位に一致します。
249
+ 仕事を省いて速いわけではありません。この同じ 394 Cop について、表のどのコーパスでも
250
+ **offense の総数が一致**し、RuboCop 自身のツリーと Mastodon ではその 1 件ずつが同じ位置・
251
+ 同じメッセージ・同じ severity です。Rails は 168,615 件のうち 2 件だけ食い違います
252
+ (Sonicop が出す `Style/CaseLikeIf` 1 件と、出さない `Metrics/AbcSize` 1 件)。
253
+ RuboCop 自身のツリーでは 1 件の `correctable` フラグが違います。
254
+ autocorrect は前者と後者でバイト単位に一致します。
250
255
 
251
- 再現時に注意が必要な点が 3 つあります。RuboCop は **`--cache false` と併用すると
256
+ 再現時に注意が必要な点が 4 つあります。RuboCop は **`--cache false` と併用すると
252
257
  `--parallel` を黙って無効化します**。そのためここでの並列実行はキャッシュを有効にしたうえで
253
258
  実行ごとにキャッシュディレクトリを消しており、`--cache false --parallel` で計測すると
254
259
  単一プロセスを測ることになり差が過大に出ます。また RuboCop の既定は単一プロセス、
255
260
  Sonicop は `--no-parallel` を渡さない限り並列です。そして**両方ともキャッシュを空にする**
256
261
  必要があります。Sonicop も既定でキャッシュするため、同じツリーを 2 回目に流すと自分の
257
262
  キャッシュが答えてしまい、エンジンについては何も測れません。どちらにも使い捨ての
258
- キャッシュディレクトリを渡してください。
263
+ キャッシュディレクトリを渡してください。最後に、そのキャッシュディレクトリは**実パス**である
264
+ 必要があります。macOS の `mktemp -d` は `/var/folders/…` を返し、その `/var` は symlink なので
265
+ RuboCop はそこを拒み、キャッシュ無しで走ってしまいます。
259
266
 
260
267
  ```bash
261
268
  # RuboCop(並列・キャッシュは毎回空・既定の全 394 Cop)
262
- rubocop --force-default-config --cache true --cache-root "$(mktemp -d)" \
269
+ root=$(mktemp -d /private/tmp/bench.XXXXXX)
270
+ rubocop --force-default-config --cache true --cache-root "$root" \
263
271
  --no-color --parallel -f quiet
264
272
 
265
273
  # Sonicop(キャッシュは毎回空)
266
- sonicop --force-default-config --cache-root "$(mktemp -d)" --format quiet
274
+ sonicop --force-default-config --cache-root "$root" --format quiet
267
275
  ```
268
276
 
277
+ キャッシュの書き込みもこの数値に含まれており、無料ではありません。索引は全 offense を
278
+ 「見つかった行のテキスト」付きで保持するため、`ruby/ruby` では 336 MB になります。
279
+ 2 回目の実行(キャッシュ命中)は `ruby/ruby` で 1.59 秒、Rails で 0.42 秒です。
280
+
269
281
  測定機は Apple M2(8 コア)、Ruby 4.0.6(YJIT 利用可)、RubyGems 導入の RuboCop 1.89.0。
270
- 1 分平均のロードアベレージは、計測開始時が 4.0、終了時が 3.1 でした。**アイドル状態ではありません**。
271
- RuboCop 自身のツリーだけは後から単独で測り直しています(負荷 3.7 → 4.0)。1 回目はリリース
272
- ビルドの終わりがけに走ってしまい、値が 60% ほど高く出たためです。**負荷の違う 1 行を同じ表に
273
- 並べることはできません**。
274
- 両者を同じ条件で測っているため倍率は保たれますが、秒数そのものは下限ではなく、静かなマシンなら
275
- より速く出ます。コアを奪い合うものが動いていると両者とも膨らみ、その度合いは一致しません。それが
276
- 並列の列があれだけ動く理由です。秒数そのものが重要なときは、他に負荷のない状態で測り、**実行の
277
- 前後でロードアベレージを記録してください** — その情報が無い数値は、別の数値と比べられません。
282
+ 2026-08-31 に、`rubocop_rubocop` 2693129 / `mastodon_mastodon` b59ddc7 / `Homebrew_brew` b42173b /
283
+ `rails_rails` a19f07f / `ruby_ruby` 22e4a75 の各リビジョンに対して測定しました。
284
+ 1 分平均のロードアベレージは各行の測定時点で 4.5〜7.1 で、その大半は RuboCop 自身の並列
285
+ ワーカーです(計測する以上避けられません)。**アイドル状態ではありません。**
286
+ 各コーパスで両者を連続して同じ条件で測っているため倍率は保たれますが、秒数そのものは下限ではなく、
287
+ 静かなマシンならより速く出ます。コアを奪い合うものが動いていると両者とも膨らみ、その度合いは
288
+ 一致しません。それが並列の列があれだけ動く理由です。秒数そのものが重要なときは、他に負荷のない
289
+ 状態で測り、**実行の前後でロードアベレージを記録してください** — その情報が無い数値は、
290
+ 別の数値と比べられません。
278
291
 
279
292
  ## 開発
280
293
 
data/README.md CHANGED
@@ -160,6 +160,8 @@ run. Local and HTTPS `inherit_from`, `inherit_gem`, `inherit_mode`,
160
160
  `AllCops/DisabledByDefault`, `Include`, and `Exclude`, plus per-cop `Enabled`, `Exclude`,
161
161
  `Severity`, `Safe`, `SafeAutoCorrect`, and cop settings are supported. Cops supplied by declared
162
162
  plugins are accepted as recognized-but-unimplemented without executing Ruby plugin code.
163
+ Remote configuration requests use 30-second network timeouts, and each response is limited to
164
+ 5 MiB.
163
165
 
164
166
  ```yaml
165
167
  inherit_from: .rubocop_todo.yml
@@ -240,52 +242,62 @@ once the 159 RuboCop ships as `Enabled: pending` and the 56 it ships as `Enabled
240
242
  aside; a default run reaches neither group on either side.) Times are the fastest of two
241
243
  warmed runs.
242
244
 
243
- | Corpus | Files | RuboCop parallel | Sonicop parallel | RuboCop single | Sonicop single |
244
- |---|---:|---:|---:|---:|---:|
245
- | rubocop/rubocop | 1,765 | 12.71 s | **4.59 s** | 42.74 s | **13.75 s** |
246
- | mastodon/mastodon | 3,290 | 29.95 s | **6.48 s** | 37.60 s | **15.88 s** |
247
- | Homebrew/brew | 2,179 | 18.20 s | **4.31 s** | 38.72 s | **11.67 s** |
248
- | rails/rails | 3,551 | 52.55 s | **16.88 s** | 162.55 s | **63.97 s** |
249
- | ruby/ruby | 7,466 | 132.17 s | **43.10 s** | 199.78 s | **76.07 s** |
245
+ | Corpus | Files | Offenses | RuboCop parallel | Sonicop parallel | RuboCop single | Sonicop single |
246
+ |---|---:|---:|---:|---:|---:|---:|
247
+ | rubocop/rubocop | 1,780 | 5,826 | 10.85 s | **1.53 s** | 41.44 s | **8.96 s** |
248
+ | mastodon/mastodon | 3,292 | 15,293 | 22.59 s | **3.04 s** | 34.74 s | **6.86 s** |
249
+ | Homebrew/brew | 2,296 | 51,527 | 13.56 s | **2.21 s** | 40.36 s | **6.51 s** |
250
+ | rails/rails | 3,562 | 168,615 | 32.90 s | **8.84 s** | 85.71 s | **19.17 s** |
251
+ | ruby/ruby | 7,477 | 765,975 | 86.89 s | **15.59 s** | 193.59 s | **37.98 s** |
250
252
 
251
- The gap is 2.8x to 4.6x in parallel and 2.4x to 3.3x single-process, so no single corpus summarizes
253
+ The gap is 3.7x to 7.4x in parallel and 4.5x to 6.2x single-process, so no single corpus summarizes
252
254
  it. **Read the single-process column and treat the parallel one as indicative.** Measuring the same
253
255
  two binaries three times over a day put the single-process figures within 16% of each other every
254
256
  time, while the parallel ratio on RuboCop's own tree moved between 3.3x and 9.2x purely with what
255
257
  else the machine was doing. Single-process measures the engines; parallel measures the engines plus
256
258
  how well each one's scheduling happens to fit that tree on that run.
257
259
 
258
- The speed is not bought by skipping work: over those same 394 cops the two agree on **every offense**
259
- on RuboCop's own tree, on Rails and on Mastodon — 188,812 offenses with nothing on either side of the
260
- ledger — and autocorrect is byte-identical on the first and the last.
260
+ The speed is not bought by skipping work. Over those same 394 cops the two find the **same number of
261
+ offenses** on every corpus in the table, and on RuboCop's own tree and on Mastodon every one of them
262
+ is at the same position with the same message and severity. Rails, at 168,615 offenses, differs in
263
+ two of them — one `Style/CaseLikeIf` Sonicop reports and one `Metrics/AbcSize` it does not — and
264
+ RuboCop's own tree differs in one offense's `correctable` flag. Autocorrect is byte-identical on the
265
+ first and the last.
261
266
 
262
- Three details matter for reproducing this. RuboCop **silently turns `--parallel` off when combined
267
+ Four details matter for reproducing this. RuboCop **silently turns `--parallel` off when combined
263
268
  with `--cache false`**, so its parallel runs here use a cache directory that is deleted before each
264
269
  run rather than disabled; timing it with `--cache false --parallel` measures a single process and
265
270
  overstates the difference. RuboCop's default is a single process, while Sonicop is parallel unless
266
- `--no-parallel` is passed. And both sides need a **cold** cache: Sonicop caches by default too, so a
267
- second run over the same tree answers from its own cache and measures nothing about the engine.
268
- Give each tool a throwaway cache root.
271
+ `--no-parallel` is passed. Both sides need a **cold** cache: Sonicop caches by default too, so a
272
+ second run over the same tree answers from its own cache and measures nothing about the engine —
273
+ give each tool a throwaway cache root. And the cache root must be a **real path**: macOS `mktemp -d`
274
+ returns `/var/folders/…`, whose `/var` is a symlink, and RuboCop refuses such a location and runs
275
+ with no cache at all.
269
276
 
270
277
  ```bash
271
278
  # RuboCop, parallel, cold cache, its full default set of 394 cops
272
- rubocop --force-default-config --cache true --cache-root "$(mktemp -d)" \
279
+ root=$(mktemp -d /private/tmp/bench.XXXXXX)
280
+ rubocop --force-default-config --cache true --cache-root "$root" \
273
281
  --no-color --parallel -f quiet
274
282
 
275
283
  # Sonicop, cold cache
276
- sonicop --force-default-config --cache-root "$(mktemp -d)" --format quiet
284
+ sonicop --force-default-config --cache-root "$root" --format quiet
277
285
  ```
278
286
 
287
+ Writing the cache is part of these numbers, and it is not free: the index holds every offense with
288
+ the source line it was found on, which is 336 MB over `ruby/ruby`. A second run against a warm cache
289
+ answers in 1.59 s there, and in 0.42 s over Rails.
290
+
279
291
  Machine: Apple M2 (8 cores), Ruby 4.0.6 with YJIT available, RubyGems-installed RuboCop 1.89.0.
280
- The one-minute load average was 4.0 when the run started and 3.1 when it finished — the machine was
281
- in use, not idle. RuboCop's own tree was re-measured on its own afterwards, at load 3.7 rising to 4.0,
282
- because the first pass over it ran while a release build was still finishing and its numbers came out
283
- 60% high; a row measured under a different load cannot sit in the same table as the others. Both tools
284
- ran under the same conditions, so the ratios hold, but the absolute
285
- seconds are not a floor: expect better on a quiet machine. Anything competing for cores inflates
286
- both sides, and not by the same factor on each, which is what makes the parallel column move as much
287
- as it does. If the absolute numbers matter to you, measure on an idle machine and record the load
288
- either side of the run — a figure without that context cannot be compared with another one.
292
+ Measured on 2026-08-31 against the corpora at `rubocop_rubocop` 2693129, `mastodon_mastodon` b59ddc7,
293
+ `Homebrew_brew` b42173b, `rails_rails` a19f07f and `ruby_ruby` 22e4a75. The one-minute load average
294
+ was between 4.5 and 7.1 as each row was taken — most of it RuboCop's own parallel workers, which is
295
+ inherent to measuring them. **The machine was in use, not idle.** Both tools ran back to back under
296
+ the same conditions on each corpus, so the ratios hold, but the absolute seconds are not a floor:
297
+ expect better on a quiet machine. Anything competing for cores inflates both sides, and not by the
298
+ same factor on each, which is what makes the parallel column move as much as it does. If the
299
+ absolute numbers matter to you, measure on an idle machine and record the load either side of the
300
+ run — a figure without that context cannot be compared with another one.
289
301
 
290
302
  ## Development
291
303
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Generated from Cargo.toml by `rake version:sync`. Do not edit by hand.
4
4
  module Sonicop
5
- VERSION = '26.8.112'
5
+ VERSION = '26.9.100'
6
6
  end
data/libexec/sonicop CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sonicop
3
3
  version: !ruby/object:Gem::Version
4
- version: 26.8.112
4
+ version: 26.9.100
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Yohei