How har9421/codereviewproject works
Project type and purpose
• This is a standalone code‐review automation tool written in .NET Core (C#) that also supports JavaScript/TypeScript via ESLint.
• It’s designed to run in a CI/CD pipeline (Azure Pipelines) to fetch coding standards (JSON), analyze code (Roslyn for C#, ESLint for JS/TS), post inline comments on Azure DevOps pull requests, and optionally block the PR on error‐level violations.
File structure
Top level
• azure-pipelines.yml / azure-pipelines-github-bot.yml → pipeline definitions
• package.json → JS/TS ESLint dependencies (for React support)
• run-test.sh, test-*.sh → local automation scripts
• src/CodeReviewRunner → .NET Core service project
– Configuration (CodeReviewOptions, ResilienceOptions)
– Interfaces (IAnalysisService, IAzureDevOpsService, ICodeReviewService, IRulesService)
– Services (AnalysisService, AzureDevOpsService, CSharpAnalyzer, CodeReviewService, RuleFetcher, RulesService)
– Models (CodeIssue, CodingRule)
– HealthChecks (e.g., AzureDevOpsHealthCheck)
– appsettings*.json → environment-specific configuration
• tests/CodeReviewRunner.Tests → unit tests
README for additional insights
• Reads coding standards from remote JSON
• Runs analyzers on C# and JS/TS
• Posts comments directly on Azure DevOps PR
• Pipeline variables: CODING_STANDARDS_URL, OAuth token
Detail
• Retry/resilience policy around external calls
• That CodeIssue objects flow from analyzers to the review poster
• Don’t overthink: break the runner into as many logical components as shown in the file tree