Skip to content

Add Copilot PR review instructions for modern Go (1.26) patterns #7315

@kristenwomack

Description

@kristenwomack

Problem

Copilot PR reviewer flagged 5 false positives on PR #7223 because it didn't know about Go 1.26 language features:

  • 4 comments claimed new(false)/new(true) is invalid Go — Go 1.26 supports new(expr) for pointer literals
  • 1 comment claimed internal.ErrorWithSuggestion had a missing import — the import existed outside the diff context

These patterns are already documented in cli/azd/AGENTS.md (lines 185-197, 'Modern Go Patterns'), but the Copilot PR reviewer reads .github/instructions/*.instructions.md files, not AGENTS.md.

Proposed Fix

Create .github/instructions/go.instructions.md with applyTo: '**/*.go' containing the modern Go 1.26 patterns most likely to trigger false positives, plus guidance to check full file context before flagging missing imports.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions