Repository: pantsbuild/pants

Issue:
scalastyle/checkstyle goals not install in `lint` by default
Now that we have an explicit `lint` goal, installing scalastyle and (java) checkstyle there should be entirely uncontroversial.


Discussion:

Resolving patch:
diff --git a/pants-plugins/src/python/internal_backend/optional/__init__.py b/pants-plugins/src/python/internal_backend/optional/__init__.py
deleted file mode 100644
diff --git a/pants-plugins/src/python/internal_backend/optional/register.py b/pants-plugins/src/python/internal_backend/optional/register.py
deleted file mode 100644
--- a/pants-plugins/src/python/internal_backend/optional/register.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# coding=utf-8
-# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
-# Licensed under the Apache License, Version 2.0 (see LICENSE).
-
-from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
-                        unicode_literals, with_statement)
-
-from pants.backend.jvm.tasks.checkstyle import Checkstyle
-from pants.backend.jvm.tasks.scalastyle import Scalastyle
-from pants.goal.task_registrar import TaskRegistrar as task
-
-
-def register_goals():
-  task(name='checkstyle', action=Checkstyle).install('lint')
-  task(name='scalastyle', action=Scalastyle).install('lint')
diff --git a/src/python/pants/backend/jvm/register.py b/src/python/pants/backend/jvm/register.py
--- a/src/python/pants/backend/jvm/register.py
+++ b/src/python/pants/backend/jvm/register.py
@@ -35,6 +35,7 @@
 from pants.backend.jvm.tasks.bootstrap_jvm_tools import BootstrapJvmTools
 from pants.backend.jvm.tasks.bundle_create import BundleCreate
 from pants.backend.jvm.tasks.check_published_deps import CheckPublishedDeps
+from pants.backend.jvm.tasks.checkstyle import Checkstyle
 from pants.backend.jvm.tasks.classmap import ClassmapTask
 from pants.backend.jvm.tasks.consolidate_classpath import ConsolidateClasspath
 from pants.backend.jvm.tasks.detect_duplicates import DuplicateDetector
@@ -61,6 +62,7 @@
 from pants.backend.jvm.tasks.scala_repl import ScalaRepl
 from pants.backend.jvm.tasks.scaladoc_gen import ScaladocGen
 from pants.backend.jvm.tasks.scalafmt import ScalaFmtCheckFormat, ScalaFmtFormat
+from pants.backend.jvm.tasks.scalastyle import Scalastyle
 from pants.backend.jvm.tasks.unpack_jars import UnpackJars
 from pants.base.deprecated import warn_or_error
 from pants.build_graph.build_file_aliases import BuildFileAliases
@@ -197,12 +199,16 @@ def register_goals():
   task(name='junit', action=JUnitRun).install('test')
   task(name='bench', action=BenchmarkRun).install('bench')
 
+  # Linting.
+  task(name='scalafmt', action=ScalaFmtCheckFormat, serialize=False).install('lint')
+  task(name='scalastyle', action=Scalastyle, serialize=False).install('lint')
+  task(name='checkstyle', action=Checkstyle, serialize=False).install('lint')
+
   # Running.
   task(name='jvm', action=JvmRun, serialize=False).install('run')
   task(name='jvm-dirty', action=JvmRun, serialize=False).install('run-dirty')
   task(name='scala', action=ScalaRepl, serialize=False).install('repl')
   task(name='scala-dirty', action=ScalaRepl, serialize=False).install('repl-dirty')
-  task(name='scalafmt', action=ScalaFmtCheckFormat, serialize=False).install('lint', first=True)
   task(name='scalafmt', action=ScalaFmtFormat, serialize=False).install('fmt')
   task(name='test-jvm-prep-command', action=RunTestJvmPrepCommand).install('test', first=True)
   task(name='binary-jvm-prep-command', action=RunBinaryJvmPrepCommand).install('binary', first=True)


Test patch: