From eed51c61401d205efde15056d042a7c3689e44a3 Mon Sep 17 00:00:00 2001 From: pgfm Date: Fri, 17 Jun 2022 21:47:19 -0500 Subject: [PATCH] Restricting to scala files but still passing filenames rather than relying on the scalafmt config --- .pre-commit-hooks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index f6cbae0..ef618c4 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -4,5 +4,7 @@ description: "runs the scalafmt code formatter" entry: scalafmt language: coursier - types: [text] + types: [file] + files: \.(scala|sbt|sc)$ stages: [commit] + pass_filenames: true