Skip to content

Instantly share code, notes, and snippets.

@nitay
Created September 13, 2016 15:02
Show Gist options
  • Save nitay/759ad1427833150902a00e1bec8a2ad0 to your computer and use it in GitHub Desktop.
Save nitay/759ad1427833150902a00e1bec8a2ad0 to your computer and use it in GitHub Desktop.
# This turns e.g. 2.10.6 into 2_10, which is the format required for scalastyle
scala_major = Versions.get('scala')
scala_major = scala_major[0:scala_major.rfind('.')].replace('.', '_')
target(name='scalastyle_' + scala_major,
dependencies=[
'3rdparty/org/scalastyle:scalastyle',
]
)
backend_packages: +[
"scalastyle",
]
[compile.scalastyle]
config: scalastyle-config.xml
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.jvm.tasks.scalastyle import Scalastyle
from pants.goal.task_registrar import TaskRegistrar as task
def register_goals():
task(name='scalastyle', action=Scalastyle).install('compile')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment