From 33911c01f4ba1f933026501c2be35dc3c1a3419b Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Wed, 24 Apr 2024 22:26:07 +0200 Subject: [PATCH 1/2] remove unused file --- .../skip-windows/caching/files/RemoveUnused.scalafix.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/sbt-test/skip-windows/caching/files/RemoveUnused.scalafix.conf diff --git a/src/sbt-test/skip-windows/caching/files/RemoveUnused.scalafix.conf b/src/sbt-test/skip-windows/caching/files/RemoveUnused.scalafix.conf deleted file mode 100644 index 286cbbb4..00000000 --- a/src/sbt-test/skip-windows/caching/files/RemoveUnused.scalafix.conf +++ /dev/null @@ -1 +0,0 @@ -rules = [RemoveUnused] \ No newline at end of file From 0572c3f97fd146071881da74f815df50f7861ebe Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Wed, 24 Apr 2024 23:07:48 +0200 Subject: [PATCH 2/2] guard current cache invalidation behavior with --settings --- src/sbt-test/skip-windows/caching/test | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sbt-test/skip-windows/caching/test b/src/sbt-test/skip-windows/caching/test index 69abd4ba..dfe6b223 100644 --- a/src/sbt-test/skip-windows/caching/test +++ b/src/sbt-test/skip-windows/caching/test @@ -162,6 +162,17 @@ $ copy-file files/Null.scala src/main/scala/InitiallyValid.scala -> scalafix --check $ delete src/main/scala +# files should be re-checked if custom rule configuration is added or removed from the CLI (even if the rule is the same) +> set scalafixConfig := Some(file("files/DisableSyntaxVar.scalafix.conf")) +$ mkdir src/main/scala +$ copy-file files/Null.scala src/main/scala/ValidWithoutCustomSettings.scala +-> scalafix --check --settings.DisableSyntax.noNulls=true +> scalafix --check +-> scalafix --check --settings.DisableSyntax.noNulls=true +$ exec chmod 000 src/main/scala/ValidWithoutCustomSettings.scala +-> scalafix --check --settings.DisableSyntax.noNulls=true +$ delete src/main/scala + # files should be re-checked after updating the default configuration (even if the rule is the same) > set scalafixConfig := None $ mkdir src/main/scala