# Go CodeQLクエリによるコード品質

CodeQL が Go で記述されたコードのコード品質を分析するために使用するクエリを調べる。

Code Quality は、以下の CodeQL クエリを使用して Go コードを分析し、コード品質に関する問題を検出します。

* あなたの**既定のブランチ**の結果が、リポジトリの "標準の結果" ダッシュボードに表示されます。
* **Pull requests (プル リクエスト)** は、発見された事項とともに、`github-code-quality[bot]` によるコメントとして表示されます

Copilot の自動修正 の提案は、可能な場合に検出結果に対して提供されます。

<div class="ghd-tool rowheaders">

| クエリ名 | カテゴリ | Severity |
| --- | --- | --- |
| [フィールドへの無駄な割り当て](https://codeql.github.com/codeql-query-help/go/go-useless-assignment-to-field/) | 保守性 | Warnung |
| [ローカル変数への無駄な代入](https://codeql.github.com/codeql-query-help/go/go-useless-assignment-to-local/) | 保守性 | Warnung |
| [ビットごとの排他的か、指数のように使用されます](https://codeql.github.com/codeql-query-help/go/go-mistyped-exponentiation/) | Reliability | Warnung |
| [同じ値の比較](https://codeql.github.com/codeql-query-help/go/go-comparison-of-identical-expressions/) | Reliability | Warnung |
| [定数長の比較](https://codeql.github.com/codeql-query-help/go/go-constant-length-comparison/) | Reliability | Warnung |
| ['if' 分岐を複製する](https://codeql.github.com/codeql-query-help/go/go-duplicate-branches/) | Reliability | Warnung |
| [重複する 'if' 条件](https://codeql.github.com/codeql-query-help/go/go-duplicate-condition/) | Reliability | エラー |
| [重複したスイッチケース](https://codeql.github.com/codeql-query-help/go/go-duplicate-switch-case/) | Reliability | エラー |
| [式は何も影響を及ぼしません](https://codeql.github.com/codeql-query-help/go/go-useless-expression/) | Reliability | Warnung |
| [同一オペランド](https://codeql.github.com/codeql-query-help/go/go-redundant-operation/) | Reliability | Warnung |
| [不可能なインタフェースのnil値チェック](https://codeql.github.com/codeql-query-help/go/go-impossible-interface-nil-check/) | Reliability | Warnung |
| [for ループの方向が不一致](https://codeql.github.com/codeql-query-help/go/go-inconsistent-loop-direction/) | Reliability | エラー |
| [エラー チェックがありません](https://codeql.github.com/codeql-query-help/go/go-missing-error-check/) | Reliability | Warnung |
| [長さに対するオフバイワン比較](https://codeql.github.com/codeql-query-help/go/go-index-out-of-bounds/) | Reliability | エラー |
| [回復するための冗長呼び出し](https://codeql.github.com/codeql-query-help/go/go-redundant-recover/) | Reliability | Warnung |
| [負の値の冗長チェック](https://codeql.github.com/codeql-query-help/go/go-negative-length-check/) | Reliability | Warnung |
| [自己割り当て](https://codeql.github.com/codeql-query-help/go/go-redundant-assignment/) | Reliability | Warnung |
| [範囲外にシフト](https://codeql.github.com/codeql-query-help/go/go-shift-out-of-range/) | Reliability | Warnung |
| [到達できないステートメント](https://codeql.github.com/codeql-query-help/go/go-unreachable-statement/) | Reliability | Warnung |
| [空白文字が演算子の優先順位と矛盾する](https://codeql.github.com/codeql-query-help/go/go-whitespace-contradicts-precedence/) | Reliability | Warnung |
| [ラップされたエラーは常に nil です](https://codeql.github.com/codeql-query-help/go/go-unexpected-nil-value/) | Reliability | Warnung |
| [エラー処理をせずに閉じた書き込み可能なファイルハンドル](https://codeql.github.com/codeql-query-help/go/go-unhandled-writable-file-close/) | Reliability | Warnung |

</div>