Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

New rule: `unnecessary-analysis-test-within-option`

オープン
#589 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
領域
tooling

調査の方向性

提供されたテストケースと変更なしのテストケースから始め、#587 のテストケースのコードブロック構文への依存を考慮してください。両方の例で示されているように、ルールが不要な @within オプションのみを削除し、必要なものを保持すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

new lint testing
Rule summary

In #lang resyntax/test, the @within option for analysis-test: is used to narrow the scope of a following @inspect option. However, it's only necessary if the @inspect option is ambiguous if its scope isn't narrowed. There should be a refactoring rule that removes unnecessary @within options.

Test case
#lang resyntax/test

test: "unnecessary @within option can be removed"
|--------------------
| #lang resyntax/test
| analysis-test: "unused positional argument in module-level function"
| - (define (f x y) x)
| @within - (f x y)
| @inspect - y
| @property usage-count
| @assert 0
|====================
| #lang resyntax/test
| analysis-test: "unused positional argument in module-level function"
| --------------------
| (define (f x y) x)
| (f 1 2)
| --------------------
| @inspect - y
| @property usage-count
| @assert 0
|--------------------
No-change test case
#lang resyntax/test

no-change-test: "necessary @within not removable"
|--------------------
| #lang resyntax/test
| analysis-test: "unused positional argument in module-level function"
| - (define (f x y) x)
| @within - (f x y)
| @inspect - x
| @property usage-count
| @assert 1
|--------------------
Additional context

This came up while I was reviewing #556, in which copilot used @within unnecessarily a few times. Also, this depends on #587 for the test case code block syntax.

主要言語
Racket
スター
70
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jackfirth/resyntax のほかの issue

jackfirth/resyntax の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。