52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
# Starter pipeline
|
|
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
# Add steps that build, run tests, deploy, and more:
|
|
# https://aka.ms/yaml
|
|
|
|
trigger:
|
|
- main
|
|
|
|
pool:
|
|
name: 'Default'
|
|
|
|
steps:
|
|
- checkout: self
|
|
persistCredentials: true
|
|
- task: AOAICodeReview@3
|
|
inputs:
|
|
api_key: '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'
|
|
model: 'gpt-4o'
|
|
# --- Language & Pro-Tip Persona ---
|
|
systemMessage: |
|
|
You are a Lead .NET Architect. Focus on logic, security, and modern C# 13 syntax.
|
|
|
|
*** PRO-TIP: IGNORE STYLE & FORMATTING ***
|
|
Do NOT comment on:
|
|
- Indentation, bracing, or whitespace.
|
|
- Naming conventions (PascalCase, camelCase).
|
|
- Unused using statements or basic sorting.
|
|
These are strictly enforced by our project's .editorconfig.
|
|
Only flag style if it impacts readability or performance.
|
|
|
|
# --- Concrete C# Rules ---
|
|
additionalInstructions: |
|
|
1. Flag 'async void' or missing 'ConfigureAwait(false)' in library code.
|
|
2. Ensure sensitive data is not logged in 'Microsoft.Extensions.Logging' calls.
|
|
3. Recommend 'Primary Constructors' for dependency injection boilerplate.
|
|
4. Identify potential memory leaks in 'Task.Run' or long-running 'BackgroundService' implementations.
|
|
|
|
# --- Quota & Performance Filters ---
|
|
fileExtensions: '.cs,.cshtml,.razor' # Strictly limit to C# related files
|
|
excludeFiles: |
|
|
**/Migrations/**
|
|
**/obj/**
|
|
**/bin/**
|
|
**/*.Designer.cs
|
|
**/appsettings*.json
|
|
**/*.csproj
|
|
|
|
# --- Review Thresholds ---
|
|
maxComments: 5 # Keeps feedback concise and prevents high output-token costs
|
|
severityFilter: 'Important' # Only show Important/Critical issues; skip minor suggestions
|
|
|
|
condition: eq(variables['Build.Reason'], 'PullRequest') |