WeSearch

Multi-Line Formatting by Default

·5 min read · 0 reactions · 0 comments · 9 views
#programming#codereview#softwaredevelopment
Multi-Line Formatting by Default
⚡ TL;DR · AI summary

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.

Key facts
Original article
DEV.to (Top)
Read full at DEV.to (Top) →
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).

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from DEV.to (Top)