[ 
https://issues.apache.org/jira/browse/DAFFODIL-2133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17312604#comment-17312604
 ] 

John Interrante commented on DAFFODIL-2133:
-------------------------------------------

I've become aware of an opinionated code formatter called scalafmt (thanks 
[~jw3]).  It integrates with IDEs such IntelliJ IDEA and can be plugged into 
sbt.  Scalariform hasn't had any new commits since June 2019 while scalafmt's 
last commit was 2 days ago and its last release was 5 months ago.  Unlike 
scalariform, scalafmt can wrap excessively long lines and therefore help 
resolve DAFFODIL-841 as well as this issue.

I suggest we consider rewording this issue to say: let's agree on a scalafmt 
configuration that best matches our desired code style, format the entire 
codebase with scalafmt in an isolated PR, and either call scalafmt during sbt 
builds or ask contributors to configure their IDEs to format with scalafmt when 
saving a file to ensure Daffodil code remains formatted during development.

> Enable and configure sbt-scalariform plugin
> -------------------------------------------
>
>                 Key: DAFFODIL-2133
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2133
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Steve Lawrence
>            Priority: Minor
>              Labels: beginner
>
> We should enable the [sbt-scalariform|https://github.com/sbt/sbt-scalariform] 
> plugin to enable style checks to fail builds that do not meet style 
> guidelines. This probably means fixing a bunch of code that doesn't follow 
> the guidelines before we can actual turn it on in builds.
> The configuration of the plugin can also be used as guidance for how to 
> configure IDE's that do autoformatting.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to