[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

plSQL code formatting / tabs, spaces and indenting



While working on Payment.sql::payment_post(), I feel that I have to
say the code of that (and a number of other) function(s) are
completely unreadable to me. Some of the issues I find:

 - The indenting does not indicate logical blocks
 - Indenting within SQL statements jumps 15 positions to the right
without clear indication of why (indentation does not support
readability there either)
 - There are lots of tabs which throw off indentation (and to make
things worse: show up as green blocks in my editor)
 - There's lots of trailing whitespace (and to make things worse:
trailing whitespace shows up as red blocks in my editor)
 - Separate DECLARE statements for each declared variable
 - Variables DECLAREd in the outer-most block which are only used in a
very limited scope


Please compare the attached file (which mainly addresses the indenting
issue) to the file currently in the repository to see what I mean. (If
the file has CRLF line-endings, I'm sorry, I work on Windows, most of
the time.)


Are there any conventions in other projects we can adopt?


Bye,


Erik.

Attachment: lsmb-reindented-payment_post.sql
Description: Binary data