Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-6861

Scalastyle config prevents building Maven child modules alone

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.1
    • 1.4.0
    • Build
    • None

    Description

      This doesn't work because scalastyle fails to run: cd core; mvn package It's something that might reasonably be expected to work, and does, except for scalastyle.

      scalastyle fails because its config file is declared to be at scalastyle-config.xml, but this is where it is relative to the project root (parent) only. The fix is to prefix with

      ${project.parent.basedir}
      

      And while I'm at it:

      It's a little funny that scalastyle-config.xml is at the top level of the project. It should probably live in dev/ with other style-related resources. This requires updating the SBT config too.

      The current config writes output in scalastyle-output.xml, but, this means it ends up in the root directory of every module, where it's not cleaned up. It should go in target/.

      Regarding SPARK-4066, I also note that the config forces scalastyle checks to run in the package phase, when its default is the later verify phase. The complaint there was that running something like package during development with outstanding style problems fails the build. Just letting it default to verify would push back execution of scalastyle to cases where, say, install was run (or it was triggered manually).

      We can update Scalastyle to 0.7.0, to match the SBT build that actually runs these checks for real.

      CC rahulsinghal.iitd

      Attachments

        Issue Links

          Activity

            People

              srowen Sean R. Owen
              srowen Sean R. Owen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: