Add perltidy support and apply it to the entire codebase #151

Merged
tcooper merged 8 commits from develop into main 2023-02-20 22:17:29 +00:00
2 changed files with 21 additions and 1 deletions
Showing only changes of commit 4bfc29fc69 - Show all commits

16
.perltidyrc Normal file
View file

@ -0,0 +1,16 @@
# Workaround needed for handling non-ASCII in files.
# # See <https://github.com/houseabsolute/perl-code-tidyall/issues/84>.
--character-encoding=none
--no-valign
# 120 characters would be desired but it is not feasible right now
#-l=120 # 120 characters per line
-l=160
-fbl # don't change blank lines
-fnl # don't remove new lines
-nsfs # no spaces before semicolons
-baao # space after operators
-bbao # space before operators
-pt=2 # no spaces around ()
-bt=2 # no spaces around []
-sbt=2 # no spaces around {}
-sct # stack closing tokens )}

View file

@ -1,9 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/henryykt/pre-commit-perl
rev: v0.0.5
hooks:
- id: perltidy