Below is a small/quick list for Code reviews. (We have mainly used it for Dynamics CRM plugins/custom workflows development, but same can be applied for other .net projects)
Technical – In context of methods being modified/created for current changes
- Validate for below
- Database retrieve/query operation that can be avoided, if data is already available or can be collectively retrieved. (Very important because for performance)
- Multiple/unwanted loops for same collection in a method
- More checks can be added hereā¦
- Naming convention
Identifier | Case | Example |
Enum values | Pascal | FatalError |
Read-only Static field | Pascal | RedValue |
Method | Pascal | ToString |
Parameter | Camel | typeName |
Property | Pascal | BackColor |
- No warnings must be there (as per the standard rule set being used)
- No commented code is present
- Comments
- Methods must have comments, preferably referencing and matching the algorithms and logic provided in the design
- Check spelling mistakes in method names/comments
- Defect number, CR number should not be referenced in code
- Press Ctrl+K+D (code formatting) to check if code document is formatted properly
Functional
Verify the code as per the requirements (document)
- For each functionality required there should be code with appropriate comments
- Check if the logic implemented matches with requirements mentioned
- Compare new changes with existing, validate if only required code is changed
Happy Coding!!