Multiple lines makes code harder to read

Software ResiliencyProgramming Best Practices

Why you should care

Having multiple lines as one line of code remarkably decreases readability of the code. This makes the source code tougher to understand, and execute, causing it to more error prone and susceptible to bugs in the near-future.

Business Impacts

Combining multiple lines of code on one line is risky because it makes the code unreadable and less productive in the long run.

Production Risk
5362

How we detect

This code insight shows that the whitespace at the beginning of each line can’t be safely stripped at compile time;
whitespace after the slash will result in tricky errors;
and while most script engines support this, it is not part of ECMAScript.
Use string concatenation instead.
5362

About CAST and Highlight’s Code Insights

Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.

See featuresHow it works