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

Merged
tcooper merged 5 commits from add_perltidy_support into develop 2023-02-20 19:33:55 +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: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0 rev: v4.4.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-json - id: check-json
- id: check-yaml - id: check-yaml
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/henryykt/pre-commit-perl
rev: v0.0.5
hooks:
- id: perltidy