Azure / Azure/Connectors-NET-LSP

Investigate local code review tooling to reduce PR review iterations

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
0
Forks
4
Avg merge
3d 4h
Merged PRs (30d)
5

Description

## Summary

Investigate options for running automated code review locally before pushing, to reduce the number of PR review iterations.

## Background

PR #33 went through 8 rounds of Copilot review with 28 total comments. Many issues (edge cases, naming, platform concerns) could have been caught before the first push if a local review step existed.

## Options to investigate

1. **`gh copilot` CLI** — The general-purpose Copilot CLI (`gh copilot`) exists but has no `review` subcommand. Investigate if it can be prompted to review a diff or staged files for code quality.

2. **GitHub Copilot code review API** — Check if Copilot pull request reviewer can be invoked programmatically on a local diff before creating a PR.

3. **Custom pre-push script** — A script that runs the diff through a local LLM or the Copilot API with the repo's coding guidelines, then blocks the push if issues are found.

4. **Roslyn analyzers** — We already have StyleCop and Roslynator. Consider adding:
- Custom analyzers for single-letter lambda detection
- Custom analyzers for `ConfigureAwait(false)` without named parameter
- These would catch issues at build time, not just in pre-commit grep

## Acceptance criteria

- [ ] Evaluate at least 2 options above
- [ ] Implement the most practical option
- [ ] Demonstrate it catches at least 3 of the issue types from PR #33

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.