Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SonarQubeクライアントのバージョンを更新する #1856

Merged

Conversation

berryzplus
Copy link
Contributor

PR の目的

SonarQubeクライアントを最新版に更新して静的解析の精度を上げます。

カテゴリ

  • その他の問題

PR の背景

静的解析ツール「SonarQubeクライアント」の新しいバージョンがリリースされています。

外部ツールもプログラムなので、バージョンアップによって機能が向上したり不具合が解消したりします。

PR のメリット

PR のデメリット (トレードオフとかあれば)

仕様・動作説明

GitHub Actionsで静的解析を実行するスクリプト「sonarscan.yml」は、
Sonar Qubeクライアントのバージョンを環境変数で定義しておき、
静的解析キャッシュのキーとダウンロードファイルのパスに使われるように作ってあります。

  1. SONAR_QUBE_VERSIONの定義を変える。
  2. 静的解析キャッシュのキーが変わるので、キャッシュが使われなくなる。
  3. キャッシュがないので新しいzipファイルをダウンロードする。
  4. 変更されたキーに対して、新しいキャッシュが保存される。

厳密には、バージョンアップによって他も変えられるようになっているかも知れませんが、今回はバージョン変更のみで対応します。

静的解析キャッシュが使われない関係で、直近30日間にマージされた変更差分が再チェックされます。
Security Hotspotが3件、Code Smellsが5件検出されますが、PRの趣旨と関係ないため対応しません。

PR の影響範囲

SonarCloudの解析結果に影響する変更です。

テスト内容

アプリの機能変更がないため、ローカルのGitHub Actionsを実行したのみです。

関連 issue, PR

参考資料

@sonarcloud
Copy link

sonarcloud bot commented Jun 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sanomari
Copy link
Contributor

静的解析キャッシュが使われない関係で、直近30日間にマージされた変更差分が再チェックされます。
Security Hotspotが3件、Code Smellsが5件検出されますが、PRの趣旨と関係ないため対応しません。

@berryzplus
Copy link
Contributor Author

ん?

静的解析キャッシュが使われない関係で、直近30日間にマージされた変更差分が再チェックされます。
Security Hotspotが3件、Code Smellsが5件検出されますが、PRの趣旨と関係ないため対応しません。

セキュリティ対策か何かで「PRビルド時にはマージ済みのスクリプトが走る」ということらしいです。
ビルド結果はローカルで実施したもので確認できます。
https://github.com/berryzplus/sakura/runs/6850582898

@berryzplus
Copy link
Contributor Author

ありがとうございます。マージしときます。

@berryzplus berryzplus merged commit 74eee00 into sakura-editor:master Jun 14, 2022
@berryzplus berryzplus deleted the feature/upgrade_sonar_qube branch June 14, 2022 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants