Skip to main content

코드 품질에 대한 CodeQL 쿼리 이동

CodeQL에서 Go로 작성된 코드의 코드 품질을 분석하는 데 사용하는 쿼리를 살펴봅니다.

Code Quality uses the following CodeQL queries to analyze Go code and detect code quality issues on:

  • Your default branch, with results shown on the repository's "Standard findings" dashboard
  • Pull requests, with findings shown as comments made by github-code-quality[bot]

Copilot Autofix suggestions are provided for findings where possible.

Query nameCategorySeverity
Useless assignment to fieldMaintainabilityWarning
Useless assignment to local variableMaintainabilityWarning
Bitwise exclusive-or used like exponentiationReliabilityWarning
Comparison of identical valuesReliabilityWarning
Constant length comparisonReliabilityWarning
Duplicate 'if' branchesReliabilityWarning
Duplicate 'if' conditionReliabilityError
Duplicate switch caseReliabilityError
Expression has no effectReliabilityWarning
Identical operandsReliabilityWarning
Impossible interface nil checkReliabilityWarning
Inconsistent direction of for loopReliabilityError
Missing error checkReliabilityWarning
Off-by-one comparison against lengthReliabilityError
Redundant call to recoverReliabilityWarning
Redundant check for negative valueReliabilityWarning
Self assignmentReliabilityWarning
Shift out of rangeReliabilityWarning
Unreachable statementReliabilityWarning
Whitespace contradicts operator precedenceReliabilityWarning
Wrapped error is always nilReliabilityWarning
Writable file handle closed without error handlingReliabilityWarning