.perltidyrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #################################################
  2. # Categories outlined in this config
  3. # are based on the categories in the
  4. # perltidy man page:
  5. # http://perltidy.sourceforge.net/perltidy.html
  6. #################################################
  7. ###################################
  8. # I/O Control
  9. ###################################
  10. # Send all errors to standard output rather than a file.
  11. --standard-error-output
  12. # All non-critical warnings will be reported as errors.
  13. --warning-output
  14. ###################################
  15. # Basic Options
  16. ###################################
  17. # Maximum number of characters per line.
  18. --maximum-line-length=80
  19. ###################################
  20. # Code Indentation Control
  21. ###################################
  22. # The number of spaces to indent a line when a new block starts.
  23. --indent-columns=4
  24. # If a line continues, it should be indented 2 spaces.
  25. --continuation-indentation=4
  26. # If a comment is longer than the maximum line length, break it up for
  27. # readability.
  28. --outdent-long-comments
  29. # If a quoted string is longer than the maximum line length, do not break it up
  30. # for readability.
  31. --no-outdent-long-quotes
  32. ###################################
  33. # Whitespace Control
  34. ###################################
  35. # Stack opening braces in order to avoid having a brace sitting by itself on
  36. # a line.
  37. --stack-opening-tokens
  38. # Stack closing tokens in order to avoid having a brace sitting by itself on
  39. # a line.
  40. --stack-closing-tokens
  41. # Spaces between parentheses e.g. if ((my $len_tab = length($tabstr)) > 0) {
  42. --paren-tightness=2
  43. # Spaces between brackets e.g. $width = $col[$j + $k] - $col[$j];
  44. --square-bracket-tightness=2
  45. # Spaces between braces in expression e.g. $obj->{$parsed_sql->{'table'}[0]};
  46. --brace-tightness=2
  47. # Spaces between braches with blocks of code
  48. # e.g. %bf = map { $_ => -M $_ } grep { /\.deb$/ } dirents '.';
  49. --block-brace-tightness=0
  50. # Do not add spaces between semicolons within for loops.
  51. --nospace-for-semicolon
  52. ###################################
  53. # Comment Controls
  54. ###################################
  55. # Indent comments to be at the same level as the code.
  56. --indent-block-comments
  57. ###################################
  58. # Line Break Control
  59. ###################################
  60. # The else is on the same line as the brace.
  61. --cuddled-else
  62. # Create a break after -> and period if a break is required.
  63. --want-break-after='-> .'
  64. ###################################
  65. # Blank Line Control
  66. ###################################
  67. # Do not force blank lines before full line comments.
  68. --noblanks-before-comments
  69. # Do not force blank lines before blocks starting with for, foreach, while,
  70. # until, and if,unless.
  71. --noblanks-before-blocks
  72. ###################################
  73. # Vertical Alignment
  74. ###################################
  75. # Turn off vertical alignment.
  76. -novalign