Layout - TheRedLady/nemetschek_internship GitHub Wiki

General

  • Is formatting done primarily to illuminate the logical structure of the code?
  • Can the formatting scheme be used consistently?
  • Does the formatting scheme result in code that's easy to maintain?
  • Does the formatting scheme improve code readability?

Control Structures

  • Are sequential blocks separated from each other with blank lines?
  • Are complicated expressions formatted for readability?

Individual Statements

  • Do incomplete statements end the line in a way that's obviously incorrect?
  • Are continuation lines indented the standard indentation amount?
  • Does each line contain at most one statement?
  • Is each statement written without side effects?
  • Is there at most one data declaration per line?

Routines

  • Are the arguments to each routine formatted so that each argument is easy to read, modify, and comment?
  • Are blank lines used to separate parts of a routine?

Classes, Files and Programs

  • Is there a one-to-one relationship between classes and files for most classes and files?
  • If a file does contain multiple classes, are all the routines in each class grouped together and is each class clearly identified?