From 611c1cebc0ce2e9845209656c5f83959397a5a14 Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Wed, 19 Jul 2023 09:48:59 +0200 Subject: [PATCH 1/3] build: also aggregate httpScalafix, so headerCheck will also work on those files --- build.sbt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2fb1030de..9a7e5a80f 100644 --- a/build.sbt +++ b/build.sbt @@ -67,7 +67,8 @@ lazy val aggregatedProjects: Seq[ProjectReference] = userProjects ++ List[Projec docs, // compatibilityTests, httpJmhBench, - billOfMaterials) + billOfMaterials, + httpScalafix) lazy val root = Project( id = "pekko-http", base = file(".")) From f70f81c00b14429f6bfdf12ba45584b76fdcf83f Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Wed, 19 Jul 2023 10:21:07 +0200 Subject: [PATCH 2/3] scalafix: fix RuleSuite to use latest scalatest syntax --- .../src/test/scala/org/apache/pekko/http/fix/RuleSuite.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-scalafix/scalafix-tests/src/test/scala/org/apache/pekko/http/fix/RuleSuite.scala b/http-scalafix/scalafix-tests/src/test/scala/org/apache/pekko/http/fix/RuleSuite.scala index f4f81502b..0ae100e2d 100644 --- a/http-scalafix/scalafix-tests/src/test/scala/org/apache/pekko/http/fix/RuleSuite.scala +++ b/http-scalafix/scalafix-tests/src/test/scala/org/apache/pekko/http/fix/RuleSuite.scala @@ -13,9 +13,9 @@ package org.apache.pekko.http.fix -import org.scalatest.FunSpecLike +import org.scalatest.funspec.AnyFunSpecLike import scalafix.testkit.AbstractSemanticRuleSuite -class RuleSuite extends AbstractSemanticRuleSuite with FunSpecLike { +class RuleSuite extends AbstractSemanticRuleSuite with AnyFunSpecLike { runAllTests() } From 385220d8091b8e8a14eac05bd59ff6bc8b8e38ef Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Wed, 19 Jul 2023 11:47:35 +0200 Subject: [PATCH 3/3] fix rule placement for scalafix test --- .../pekko/http/fix/MigrateToServerBuilderTest.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/http-scalafix/scalafix-test-input/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilderTest.scala b/http-scalafix/scalafix-test-input/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilderTest.scala index d906ff553..666d80531 100644 --- a/http-scalafix/scalafix-test-input/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilderTest.scala +++ b/http-scalafix/scalafix-test-input/src/main/scala/org/apache/pekko/http/fix/MigrateToServerBuilderTest.scala @@ -1,3 +1,7 @@ +/* +rule = MigrateToServerBuilder # This has to be at the top + */ + /* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: @@ -7,10 +11,6 @@ * This file is part of the Apache Pekko project, which was derived from Akka. */ -/* -rule = MigrateToServerBuilder - */ - package org.apache.pekko.http.fix import org.apache.pekko