Skip to content

Commit

Permalink
Add ./pants backends to list all available backend packages (pantsb…
Browse files Browse the repository at this point in the history
…uild#9468)

Closes pantsbuild#8992.

![example output](https://user-images.githubusercontent.com/14852634/78420351-18b95500-7603-11ea-8250-0a3a2fea7298.png)

[ci skip-rust-tests]  # No Rust changes made.
[ci skip-jvm-tests]  # No JVM changes made.
  • Loading branch information
Eric-Arellano authored Apr 5, 2020
1 parent b1475af commit 1f0e13c
Show file tree
Hide file tree
Showing 46 changed files with 579 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contrib/avro/src/python/pants/contrib/avro/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Code generation from the Apache Avro format into Java targets."""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Create AWS Lambdas from Python code."""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Adds the `buildozer` and `meta-rename` goals to automate changes to BUILD files."""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.buildrefactor.buildozer import Buildozer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for the Kythe ecosystem.
See https://www.kythe.io.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.codeanalysis.tasks.bundle_entries import BundleEntries
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for Atlassian's Confluence service.
See https://www.atlassian.com/software/confluence.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.confluence.tasks.confluence_publish import ConfluencePublish
Expand Down
3 changes: 3 additions & 0 deletions contrib/cpp/src/python/pants/contrib/cpp/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for C++."""


from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Linter for Java.
See https://errorprone.info.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.errorprone.tasks.errorprone import ErrorProne
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Linter for Java.
See http://findbugs.sourceforge.net.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.findbugs.tasks.findbugs import FindBugs
Expand Down
2 changes: 2 additions & 0 deletions contrib/go/src/python/pants/contrib/go/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for Go."""

from pants.build_graph.build_file_aliases import BuildFileAliases, TargetMacro
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Autoformatter for Java to follow Google's Java Style guide.
See https://github.com/google/google-java-format.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.googlejavaformat.googlejavaformat import (
Expand Down
3 changes: 3 additions & 0 deletions contrib/jax_ws/src/python/pants/contrib/jax_ws/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate web service client stubs from a Web Services Description Language (WSDL) file for
calling a JAX-WS web service."""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
5 changes: 5 additions & 0 deletions contrib/mypy/src/python/pants/contrib/mypy/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Python type checker.
See http://mypy-lang.org.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.mypy.tasks.mypy_task import MypyTask
Expand Down
2 changes: 2 additions & 0 deletions contrib/node/src/python/pants/contrib/node/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for JavaScript and Node.js."""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Deprecated custom Python lints.
Instead, use the V2 backend `pants.backend.python.lint.flake8`.
"""

from pants.base.deprecated import deprecated_module
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
2 changes: 2 additions & 0 deletions contrib/scalajs/src/python/pants/contrib/scalajs/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for Scala.js."""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
5 changes: 5 additions & 0 deletions contrib/scrooge/src/python/pants/contrib/scrooge/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Thrift code generator.
See https://github.com/twitter/scrooge.
"""

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.scrooge.tasks.scrooge_gen import ScroogeGen
Expand Down
5 changes: 5 additions & 0 deletions contrib/thrifty/src/python/pants/contrib/thrifty/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Thrift code generator for Android.
See https://github.com/microsoft/thrifty.
"""

from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task

Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/awslambda/python/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Create AWS Lambdas from Python code."""

from pants.backend.awslambda.common import awslambda_common_rules
from pants.backend.awslambda.python import awslambda_python_rules

Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/antlr/java/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from Antlr3 and Antlr4.
See https://www.antlr.org.
"""

from pants.backend.codegen.antlr.java.antlr_java_gen import AntlrJavaGen
from pants.backend.codegen.antlr.java.java_antlr_library import JavaAntlrLibrary
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/antlr/python/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Python targets from Antlr3 and Antlr4.
See https://www.antlr.org.
"""

from pants.backend.codegen.antlr.python.python_antlr_library import PythonAntlrLibrary
from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.goal.task_registrar import TaskRegistrar as task
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/grpcio/python/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Python targets from Protocol Buffers (Protobufs) and gRPC.
See https://grpc.io.
"""

from pants.backend.codegen.grpcio.python.grpcio_prep import GrpcioPrep
from pants.backend.codegen.grpcio.python.grpcio_run import GrpcioRun
from pants.backend.codegen.grpcio.python.python_grpcio_library import PythonGrpcioLibrary
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/jaxb/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from Java Architecture for XML Bindings (JAXB).
See https://www.oracle.com/technical-resources/articles/javase/jaxb.html.
"""

from pants.backend.codegen.jaxb.jaxb_gen import JaxbGen
from pants.backend.codegen.jaxb.jaxb_library import JaxbLibrary
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/protobuf/java/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from Protocol Buffers (Protobufs).
See https://developers.google.com/protocol-buffers/.
"""

from pants.backend.codegen.protobuf.java.java_protobuf_library import JavaProtobufLibrary
from pants.backend.codegen.protobuf.java.protobuf_gen import ProtobufGen
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/ragel/java/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from Ragel finite state machines.
See http://www.colm.net/open-source/ragel/.
"""

from pants.backend.codegen.ragel.java.java_ragel_library import JavaRagelLibrary
from pants.backend.codegen.ragel.java.ragel_gen import RagelGen
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/codegen/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Enable this backend to turn on every single codegen backend within `pants.backend.codegen`."""

from pants.backend.codegen.antlr.java.antlr_java_gen import AntlrJavaGen
from pants.backend.codegen.antlr.java.java_antlr_library import JavaAntlrLibrary
from pants.backend.codegen.antlr.python.antlr_py_gen import AntlrPyGen
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/thrift/java/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from Thrift.
See https://thrift.apache.org.
"""

from pants.backend.codegen.thrift.java.apache_thrift_java_gen import ApacheThriftJavaGen
from pants.backend.codegen.thrift.java.java_thrift_library import JavaThriftLibrary
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/codegen/thrift/python/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Python targets from Thrift.
See https://thrift.apache.org.
"""

from pants.backend.codegen.thrift.python.apache_thrift_py_gen import ApacheThriftPyGen
from pants.backend.codegen.thrift.python.py_thrift_namespace_clash_check import (
PyThriftNamespaceClashCheck,
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/codegen/wire/java/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Generate Java targets from the Wire protocol."""

from pants.backend.codegen.wire.java.java_wire_library import JavaWireLibrary
from pants.backend.codegen.wire.java.wire_gen import WireGen
from pants.build_graph.build_file_aliases import BuildFileAliases
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/docgen/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for generating wiki-style documentation from Markdown and RST."""

from pants.backend.docgen.targets.doc import Page, Wiki, WikiArtifact
from pants.backend.docgen.tasks.generate_pants_reference import GeneratePantsReference
from pants.backend.docgen.tasks.markdown_to_html import MarkdownToHtml
Expand Down
3 changes: 3 additions & 0 deletions src/python/pants/backend/graph_info/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Various goals for insights on your project's graph, such as finding the path between any two
targets."""

from pants.backend.graph_info.tasks.cloc import CountLinesOfCode
from pants.backend.graph_info.tasks.dependees import ReverseDepmap
from pants.backend.graph_info.tasks.filemap import Filemap
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/jvm/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for both Java and Scala."""

from pants.backend.jvm.artifact import Artifact
from pants.backend.jvm.ossrh_publication_metadata import (
Developer,
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/native/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Support for using C and C++ with Python distributions via `ctypes`."""

from pants.backend.native.rules.targets import (
CLibrary,
ConanNativeLibrary,
Expand Down
2 changes: 2 additions & 0 deletions src/python/pants/backend/project_info/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Various goals for insights on your project, such as finding a target's dependencies."""

from pants.backend.project_info.rules import dependencies, source_file_validator
from pants.backend.project_info.tasks.dependencies import Dependencies
from pants.backend.project_info.tasks.depmap import Depmap
Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/python/lint/bandit/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Security linter for Python.
See https://bandit.readthedocs.io/en/latest/.
"""

from pants.backend.python.lint.bandit import rules as bandit_rules


Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/python/lint/black/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Autoformatter for Python.
See https://black.readthedocs.io/en/stable/.
"""

from pants.backend.python.lint import python_formatter
from pants.backend.python.lint.black import rules as black_rules

Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/python/lint/docformatter/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Python autoformatter for PEP257 docstring conventions.
See https://github.com/myint/docformatter.
"""

from pants.backend.python.lint import python_formatter
from pants.backend.python.lint.docformatter.rules import rules as docformatter_rules

Expand Down
5 changes: 5 additions & 0 deletions src/python/pants/backend/python/lint/flake8/register.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

"""Linter for Python.
Works with all Flake8 plugins. See https://flake8.pycqa.org/en/latest/.
"""

from pants.backend.python.lint.flake8 import rules as flake8_rules


Expand Down
Loading

0 comments on commit 1f0e13c

Please sign in to comment.