Local variables allows variables to be relegated to a function

Software AgilityCode Readability

Why you should care

Local Variables occurs when a typeset statement is used inside a function definition and the respective variables involved all become ‘local’ to that function (in addition to any properties that may take on as a result of typeset options.) The ability to define variables that are local to “subprogram” units (procedures, functions, subroutines, etc.) is necessary for writing large programs, because it helps keep subprograms independent of the main program and of each other.

Business Impacts

It is advised for local variables to have a dedicated nomenclature as it allows for the code to be read and understood easier which ensures cost-saving practices.

Cost
5362

How we detect

This code insight focuses on how local variables should begin with a lowercase character and have a limited length.

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