Validate `ranges` inside `analyze` when called as a library

オープン 初心者向け
#67 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js
領域
backend, testing

調査の方向性

src/analyze.jsを読んで、analyzeがrangesをどのように処理するかを確認し、続いてtest/analyze.test.jsの関連するケースを確認してください。node --test test/analyze.test.jsを実行し、不正な範囲と逆転した範囲のテストを追加してください。無効な入力がenum名を含むErrorをスローし、有効な範囲では検出結果が維持され、CLIの動作が変わらなければ完了です。

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

説明

analysis bug wave

Context

analyze accepts { ranges } and reads [low, high] without checking the shape. A library caller that passes a string, an inverted range or a non-integer bound gets no findings instead of an error, while the CLI rejects the same config.

Scope

  • src/analyze.js
  • test/analyze.test.js

Acceptance criteria

  • Malformed ranges throw an Error with the enum name.
  • An inverted range throws.
  • Valid ranges produce the same findings as before.
  • CLI behavior is unchanged.

Verification

node --test test/analyze.test.js

Complexity

Small (1-2 hours)

Part of Stellar Wave. Comment to claim this issue before starting.

主要言語
JavaScript
スター
0
フォーク
2
平均マージ
1日 1時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

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

codepacct/codepact-core のほかの issue

codepacct/codepact-core の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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