Improve metrics output

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, typescript
領域
ci-cd, devops

調査の方向性

リンクされたワークフロー実行に表示されている github/codeql-action/analyze の出力から始め、メトリクステーブルとベースラインメッセージがどのように生成されるかを追跡します。issue ではソースファイルもテストも指定されていません。完了の条件は、メトリクス行で結果を区別する列が維持され、メトリクスセクションが視覚的に分離され、ベースラインの文が一度だけ表示され、さらにその挙動が CodeQL CLI と Java queries のどちらに属するのかが明確になっていることです。

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

説明

Version

CodeQL CLI: 2.8.5
CodeQL action: 1.1.8 (according to CODEQL_ACTION_VERSION environment variable)

Description

Currently (at least for Java projects) the metrics table printed at the end of github/codeql-action/analyze contains the same metric name multiple times, e.g.:

|                          Metric                          | Value |
+----------------------------------------------------------+-------+
| Total lines of code in the database                      |  9668 |
| External libraries                                       |  1458 |
| External libraries                                       |    28 |
| External libraries                                       |     9 |
| External libraries                                       |     7 |
| External libraries                                       |     6 |
| External libraries                                       |     1 |
| Supported sinks in external libraries                    |     7 |
| Supported sinks in external libraries                    |     6 |
| Supported sinks in external libraries                    |     4 |
| Supported sinks in external libraries                    |     2 |
| Supported sinks in external libraries                    |     1 |
| Supported sinks in external libraries                    |     1 |
| Supported sinks in external libraries                    |     1 |
| Supported sinks in external libraries                    |     1 |
| Supported flow steps in external libraries               |    82 |
| Supported flow steps in external libraries               |    42 |
| Supported flow steps in external libraries               |    36 |
| Supported flow steps in external libraries               |    30 |
| Supported flow steps in external libraries               |    25 |
...

(workflow run)

The issue might be that these queries have multiple result columns, but the table here only seems to contain the usages count, discarding the other columns. Maybe the underlying issue is therefore caused by CodeQL CLI or by the Java queries.

Additionally it might be good to add an empty line in front of "Analysis produced the following metric data:" (to separate it more clearly from the previous table). And also the "Counted a baseline of ..." sentence seems to be printed twice (workflow run).

主要言語
TypeScript
スター
1.6k
フォーク
493
平均マージ
1日 13時間
マージ済み PR(30日)
44

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

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

はじめの一歩

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

github/codeql-action のほかの issue

github/codeql-action の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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