-
Notifications
You must be signed in to change notification settings - Fork 4
How to Align Files and Conduct a Code Review
One technical exercise you might want to master before issuing a pull request is to make sure the files you submit are aligned with the files in the corresponding Rokwire repository. This allows for maximally efficient code review. But why is this important? Software development, particularly debugging, relies heavily on identifying code by its line number. If you are using a third-party integration, these line number correspondences can become misaligned. In addition, typos and bugs introduced at the Pull Request stage and not caught tend to propagate to later versions of the code. The best way to restore this order (as much as you can) and maintain overall code quality is to do a side-by-side visual inspection (images below, click to enlarge).
In this example, we are comparing string files between a fork and the main development repository on Rokwire Github. The windows are docked side-to-side, which allows one to do a line-wise comparison.
This visual arrangement is optimal for detecting misalignments due to missing tabs or extra/missing lines. This also allows for one to identify typos and other errors and do a better job of code review.
Interested in contributing to this Wiki? Can't find what you are looking for? Submit a pull request with a suggestion for new content, or look over our current inventory of entries.