Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3917

Maven build should be strict about Scala imports ordering in the code

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • master
    • None
    • None

    Description

      For now, we do not have strict rules with Scala regarding import orders. Not everybody has the same layout and it potentially reduces readability in PRs on code change if somebody got a different import layout than the initial code.

      We should be more strict on import ordering like we do with Java.

      Proposed layout:

      base package imports
      ___blank line___
      java
      ___blank line___
      all other imports
      ___blank line___
      scala

      Should modify the scalafix maven plugin to do a strict check on import and fail the build if that last one isn't respected.  

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tungtv Tung TRAN
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h