mdedetrich commented on code in PR #122:
URL: 
https://github.com/apache/incubator-pekko-connectors-kafka/pull/122#discussion_r1281010994


##########
CONTRIBUTING.md:
##########
@@ -96,6 +96,12 @@ Example:
     * Details 2
     * Details 3
 
+## Applying code style to the project
+
+The project uses [scalafmt](https://scalameta.org/scalafmt/) to ensure code 
quality which is automatically checked on
+every PR. If you would like to check for any potential code style problems 
locally you can run `sbt checkCodeStyle`
+and if you want to apply the code style then you can run `sbt applyCodeStyle`.

Review Comment:
   > the problem is source folders like `scala-2`- these can be skipped if you 
don't run the formatting for all scala versions
   
   This is orthogonal to what we are talking about. All the `+` command in sbt 
does is it iterates through `crossScalaVersions` while setting `scalaVersion` 
and then runs the command after `+`. 
   
   sbt-scalafmt doesn't do anything different wrt `scalaVersion`, they 
completely ignore it. In fact the implementation of sbt-scalafmt just uses sbt 
to retrieve the sources from various configs and then the formatting is handled 
externally from sbt (see 
https://github.com/scalameta/sbt-scalafmt/blob/main/plugin/src/main/scala/org/scalafmt/sbt/ScalafmtPlugin.scala#L534-L535).
 If this wasn't the case then the scalafmt-native wouldn't even work because it 
has no concept of sbt's scala version since scalafmt-native doesn't even have 
anything to do with sbt.
   
   The issue we have is more specific to sbt-header because it seems to do 
something weird with configurations rather than running commands across all 
scala versions in general, so I will add the `+` there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to