pan3793 opened a new issue #1383: URL: https://github.com/apache/incubator-kyuubi/issues/1383
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and found no similar issues. ### Describe the feature Leverage Scalafmt to auto format scala code. ### Motivation Currently, the project only uses ·scala-checkstyle· for format check, and the developer should resolve the format issue by themselves. ### Describe the solution [Scalafmt](https://scalameta.org/scalafmt/) is a popular tool that supports auto format scala code, and it is supported by IDEA and Maven, we can use it to reduce the effort. ### Additional context The `.scalafmt.conf` is credited by @zhouyifan279, and I did a small tune on it. ```hocon version = 3.1.0 runner.dialect=scala212 project.git=true align = none align.openParenDefnSite = false align.openParenCallSite = false align.tokens = [] optIn.configStyleArguments = false danglingParentheses.preset = false danglingParentheses.defnSite = true danglingParentheses.callSite = false docstrings.style = Asterisk docstrings.wrap = no maxColumn = 100 newlines.topLevelStatementBlankLines = [] newlines.source = keep importSelectors = singleLine indent.extendSite = 2 rewrite.rules = [Imports] rewrite.imports.sort = scalastyle rewrite.imports.groups = [ ["javax?\\..*"], ["scala\\..*"], ["(?!org\\.apache\\.kyuubi\\.).*"], ["org\\.apache\\.kyuubi\\..*"] ] ``` ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! -- 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]
