Skip to content

Instantly share code, notes, and snippets.

@duongphuhiep
Last active September 22, 2025 14:39
Show Gist options
  • Save duongphuhiep/34f9119b9b605a98d4ada1405c97eccc to your computer and use it in GitHub Desktop.
Save duongphuhiep/34f9119b9b605a98d4ada1405c97eccc to your computer and use it in GitHub Desktop.
How to Review PRs / MRs of unfamiliar C# codes base?

How to Review PRs (or MRs) of unfamiliar C# codes base?

If you have to review a Pull Request (or Merge Request) in an unfamiliar C# codebase, what should you check? Here is my checklist for reviewing a C# codebase without fully knowing what it does:

Since we don’t know much about what the code is doing, the review should focus on best practices:

  • Are there tests that cover all the changes? If not, is there a justified reason why the changes are not unit-testable? (Yes, that can happen.)
  • Challenge any unjustified try/catch blocks.
  • Challenge the use of Generics or Reflection (often a sign of over-engineering).
  • Challenge the use of Inheritance (may indicate poor design or over-engineering).
  • Challenge the addition of extra interfaces or abstract classes (potential over-abstraction).
  • Review any static methods or classes: these are problematic if they modify application state (risk of untestable code).
  • Logging best practices:
    • Are important if branches missing log messages?
    • Do logs contain sensitive information?
    • Is high-performance logging considered?
  • If a lock or a transaction is opened → check how it’s managed and shared in the code.
  • If something is cached → what’s the cache invalidation policy? Review how this process is handled.
  • If a new Task/thread is created → check how errors coming from them are handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment