-
Notifications
You must be signed in to change notification settings - Fork 162
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
HTMLヘルプをSonarCloudの解析対象に含めたことにより増えた警告に対処する #1505
HTMLヘルプをSonarCloudの解析対象に含めたことにより増えた警告に対処する #1505
Conversation
・DOCTYPE宣言を付加する。 ・lang="ja"を指定する。 ・適切に改行する(インデントは付加しない)。
・標準は「属性名="値"」が標準だが=の前後に空白を入れてもよい。 表記ゆれを許容すると置換しづらいので一括置換しておく。
・サイズと色が指定されたものを置換する。
・色が指定されたものを置換する。 ・color="#808080"は他に合わせてgrayに置換。
・アクセシビリティの観点からtable要素には見出しを付けることになっている。 ・現状はすべてのtableに見出しがない状態になっている。 ・適切な名前を付けていく作業はしんどいので、一旦一律で「無題」という見出しを付ける。 ・見映えの変更を防ぐためcaptionは非表示要素にしておく。
・この修正は全置換ではなく手で修正を行っている。
SonarCloud Quality Gate failed. 2 Bugs No Coverage information |
✅ Build sakura 1.0.3338 completed (commit e8ece46450 by @berryzplus) |
Bugsレベルの検出件数が次善検証とズレてるのはある意味想定通りです。 検知されてるSecurity Hotspotはjavascriptからのブラウザ制御に関するものです。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
さらっと目で追ったぐらいの確認ですが、問題を起こす変更はなさそうだと感じました。
tableに無題captionを追加している件については強引ではないかなとも思いましたが、警告を抑えるための暫定対応としてならば別に構わない気がしています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
暫定対応ということなのでいい加減チェックです(笑)。
このヘルプファイルはサイトの一部として公開されているみたいです。
保留にされちゃってますけど、framesetをやめてググラビリティをあげる作業はやっておくのがベターだと思いました。
<frame src="./right.html" name="right"> | ||
<frameset cols="240,*" frameborder="0" border="0"> | ||
<frame src="./search.html" name="left" title="left" /> | ||
<frame src="./right.html" name="right" title="right" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここで3件のBugが検出されるはずってことですかね。
空白以外に差分のない行は編集なしとみなされたりするんでしょうか。
レビューありがとうございます。 |
PR の目的
HTMLヘルプをSonarCloudの解析対象に含めたことにより増えた約3500件の警告のうち、簡単に直せるものについて暫定対処を行います。
カテゴリ
PR の背景
#1494 でSonarCloudの解析対象範囲をC/C++以外にまで拡張した影響で、Bugsレベルの警告が4,000件近くになってしまったのを対処します。
PR のメリット
PR のデメリット (トレードオフとかあれば)
仕様・動作説明
アプリの仕様・機能に関する変更はありません。
変更前: HTML Work Shop が対応する古いHTMLで書かれていました。
変更後: SonarQubeが対応する最新のHTMLに移行させます。
発生している Bugs レベルの警告のうち、
framesetタグの廃止に伴う3つ以外をすべて対処します。
PR の影響範囲
HTMLヘルプの見映えに影響する可能性があります。
テスト内容
事前にSonarCloud解析で修正対象ファイル内のBugsレベル警告が3件まで減少することを確認しました。
https://sonarcloud.io/dashboard?branch=feature%2Frefactoring_of_help_html&id=berryzplus_sakura
関連 issue, PR
#1494
#1504
参考資料