Multi-Line Formatting by Default
The article discusses the advantages of using multi-line formatting in code reviews. It emphasizes that multi-line formatting enhances clarity and makes it easier for reviewers to identify changes. The author provides examples comparing compact and multi-line code to illustrate the benefits of the latter.
- ▪Multi-line formatting is preferred for code reviews as it improves clarity.
- ▪Compact code can hide changes, making reviews more difficult.
- ▪The article provides examples of how multi-line formatting can simplify the review process.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 30309) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Lars Moelleken Posted on May 27 Multi-Line Formatting by Default #programming #codereview #softwaredevelopment I have reviewed so much code that I usually prefer multi-line formatting by default. Not because it looks prettier. Because code review happens line by line. And also tools like static analysis or SQL errors are reported line by line. PS: in most IDEs you can directly jump into the code by typing or clicking FILE:LINE e.g.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).