Lines should not end with trailing whitespaces


    The PowerBuilder code rule "Lines should not end with trailing whitespaces" ensures that all lines of code in a program do not contain any unnecessary whitespace characters at the end of the line. This is important to maintain the readability and consistency of the code, as well as to prevent any potential errors that could be caused by the presence of these extra characters.

Key Benefits

  • Reduced code complexity: By avoiding trailing whitespaces, code complexity is reduced as there is no need to manually remove them.
  • Improved readability: Code with no trailing whitespaces is easier to read and understand.
  • Reduced merge conflicts: By removing the need to manually remove trailing whitespaces, merge conflicts are reduced.


Non-compliant Code Example

function string TestFunctionCall (string cnt)

string @count  = 'a               //Non compliant code

return cnt

end function
Visual Expert 2024