Skip to content

Commit bcb5cae

Browse files
authored
Merge branch 'main' into scala3-tapir-json-pickler
2 parents 07681f3 + 4060e5c commit bcb5cae

File tree

16 files changed

+192
-152
lines changed

16 files changed

+192
-152
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
- name: Check that workflows are up to date
4747
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
4848

49-
- name: Build project
50-
run: sbt '++ ${{ matrix.scala }}' test
49+
- run: sbt '++ ${{ matrix.scala }}' lintEnforce test
5150

5251
- name: Compress target directories
5352
run: tar cf targets.tar target project/target

.scalafix.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules = [OrganizeImports]
2+
3+
OrganizeImports {
4+
removeUnused = false
5+
groupedImports = Merge
6+
targetDialect = Scala3
7+
}

.scalafmt.conf

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version = 3.8.2
2-
maxColumn = 120
1+
version = "3.8.2"
2+
maxColumn = 140
33
align.preset = most
44
align.multiline = false
55
continuationIndent.defnSite = 2
@@ -12,7 +12,20 @@ danglingParentheses.preset = true
1212
optIn.annotationNewlines = true
1313
newlines.alwaysBeforeMultilineDef = false
1414
runner.dialect = scala3
15-
rewrite {
16-
rules = [AvoidInfix, PreferCurlyFors, SortImports, RedundantBraces, RedundantParens]
17-
redundantBraces.maxLines = 1
18-
}
15+
rewrite.rules = [RedundantBraces]
16+
17+
project.excludePaths = ["glob:**/scalafix/input/**", "glob:**/scalafix/output/**"]
18+
19+
rewrite.scala3.convertToNewSyntax = true
20+
rewrite.scala3.removeOptionalBraces = yes
21+
rewrite.redundantBraces.generalExpressions = true
22+
23+
rewriteTokens = {
24+
"⇒": "=>"
25+
"→": "->"
26+
"←": "<-"
27+
}
28+
29+
fileOverride {
30+
"glob:**/*.sbt" = sbt1
31+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/target": true
4+
}
5+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## FS2 Kafka JsonSchema support ##
1+
## FS2 Kafka JsonSchema
22

33
[![Continuous Integration](https://github.com/kaizen-solutions/fs2-kafka-jsonschema-support/actions/workflows/ci.yml/badge.svg)](https://github.com/kaizen-solutions/fs2-kafka-jsonschema-support/actions/workflows/ci.yml)
44
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.kaizen-solutions/fs2-kafka-jsonschema-support_3/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.kaizen-solutions/fs2-kafka-jsonschema_3)

build.sbt

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ inThisBuild {
1919
ScalacOptions.privateKindProjector
2020
)
2121
),
22+
semanticdbEnabled := true,
23+
semanticdbVersion := scalafixSemanticdb.revision,
2224
versionScheme := Some("early-semver"),
2325
githubWorkflowJavaVersions := List(JavaSpec.temurin("17")),
2426
githubWorkflowTargetTags ++= Seq("v*"),
2527
githubWorkflowPublishTargetBranches := Seq(
2628
RefPredicate.StartsWith(Ref.Tag("v")),
2729
RefPredicate.Equals(Ref.Branch("main"))
2830
),
31+
githubWorkflowBuild := Seq(
32+
WorkflowStep.Sbt(List("lintEnforce", "test"))
33+
),
2934
githubWorkflowPublish := Seq(
3035
WorkflowStep.Sbt(
3136
commands = List("ci-release"),
@@ -60,22 +65,26 @@ lazy val root =
6065
.settings(
6166
name := "fs2-kafka-jsonschema",
6267
libraryDependencies ++= {
63-
val circe = "io.circe"
6468
val fd4s = "com.github.fd4s"
6569
val tapir = "com.softwaremill.sttp.tapir"
6670
val fs2KafkaV = "3.5.1"
6771
val tapirV = "1.10.13"
6872

6973
Seq(
70-
fd4s %% "fs2-kafka" % fs2KafkaV,
71-
tapir %% "tapir-json-pickler" % tapirV,
72-
tapir %% "tapir-apispec-docs" % tapirV,
73-
"com.softwaremill.sttp.apispec" %% "jsonschema-circe" % "0.10.0",
74-
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
75-
"org.typelevel" %% "munit-cats-effect" % "2.0.0-M3" % Test,
76-
"com.dimafeng" %% "testcontainers-scala-munit" % "0.41.4" % Test,
77-
"ch.qos.logback" % "logback-classic" % "1.5.6" % Test,
78-
"io.confluent" % "kafka-json-schema-serializer" % "7.6.1"
74+
fd4s %% "fs2-kafka" % fs2KafkaV,
75+
tapir %% "tapir-json-pickler" % tapirV,
76+
tapir %% "tapir-apispec-docs" % tapirV,
77+
"com.softwaremill.sttp.apispec" %% "jsonschema-circe" % "0.10.0",
78+
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
79+
"com.disneystreaming" %% "weaver-cats" % "0.8.4" % Test,
80+
"io.github.embeddedkafka" %% "embedded-kafka-schema-registry" % "7.6.1.1" % Test,
81+
"ch.qos.logback" % "logback-classic" % "1.5.6" % Test,
82+
"io.confluent" % "kafka-json-schema-serializer" % "7.6.1"
7983
)
80-
}
84+
},
85+
excludeDependencies += "org.scala-lang.modules" % "scala-collection-compat_2.13",
86+
testFrameworks += new TestFramework("weaver.framework.CatsEffect")
8187
)
88+
89+
addCommandAlias("lint", "; scalafmtAll; scalafixAll")
90+
addCommandAlias("lintEnforce", "; scalafmtCheckAll; scalafixAll --check")

project/metals.sbt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// format: off
2+
// DO NOT EDIT! This file is auto-generated.
3+
4+
// This file enables sbt-bloop to create bloop config files.
5+
6+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
7+
8+
// format: on

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
22
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
33
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
44
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")
5+
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
56

67
libraryDependencies += "org.typelevel" %% "scalac-options" % "0.1.5"

project/project/metals.sbt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// format: off
2+
// DO NOT EDIT! This file is auto-generated.
3+
4+
// This file enables sbt-bloop to create bloop config files.
5+
6+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
7+
8+
// format: on

project/project/project/metals.sbt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// format: off
2+
// DO NOT EDIT! This file is auto-generated.
3+
4+
// This file enables sbt-bloop to create bloop config files.
5+
6+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.6.0")
7+
8+
// format: on

0 commit comments

Comments
 (0)