Report a [[platform]] entry without a name in Scan.toml

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

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

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

評価

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

調査の方向性

Scan.toml の [[platform]] テーブルのパースと、#215 で追加された、文字列でない name または path をその位置で既に報告するコードから始めてください。欠落/空の name ケースについても、ソース位置を含め、その経路を反映してください。まず issue の nmae のタイポで再現し、bal scan --platforms=sonarqube を実行し、次に単純な bal scan を実行して、両方の無言の結果を確認してください。完了とは、使用可能な name がないエントリがスキップされる代わりにその位置付きで報告され、既存の #215 のテストが引き続き通ることを意味します。

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

説明

Area/Configuration Type/Improvement
Area

Configuration

Description

A [[platform]] entry in Scan.toml with no name, or an empty one, is skipped without a message, although the docs say both name and path are required. With a typo such as nmae = "sonarqube", bal scan --platforms=sonarqube fails with "platform 'sonarqube' is not available; add its plugin to the [[platform]] table of Scan.toml", which points the user at an entry that already exists.

Raised in the review of #215 (comment) and left out of the 0.14.0 / 0.11.2 release-readiness fixes. #215 already reports a non-string name or path as an error at its position; a missing or empty name is the remaining silent case.

Steps to Reproduce
  1. In a package, add this Scan.toml:

    [[platform]]
    nmae = "sonarqube"
    path = "plugin.jar"
    
  2. Run bal scan --platforms=sonarqube.

Expected Behavior

The entry without a name is reported with its position. Whether it is an error (exit 1) or a warning is to be decided.

Actual Output

bal scan: error: platform 'sonarqube' is not available; add its plugin to the [[platform]] table of Scan.toml. A plain bal scan ignores the entry silently.

Scan Tool Version

0.14.0 (with #215)

主要言語
Java
スター
15
フォーク
12
平均マージ
2日 8時間
マージ済み PR(30日)
29

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

ballerina-platform/static-code-analysis-tool のほかの issue

ballerina-platform/static-code-analysis-tool の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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