Add plugin support for Bazel

Open
#76 14 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, python, shell
Domain
build-system

Research direction

Start by reviewing Spotless's existing plugin structure and the spotless-lib entry point, then compare Bazel's Skylark extension, shell-command, and binary-integration options. Done would mean a documented Bazel integration that can invoke spotless-lib or a Java wrapper, but the issue does not identify files or tests to begin with.

Written by the indexing model from the issue text.

Description

enhancement

Bazel is something which has interested me for a while now, so writing a Spotless plugin for it may prove to be a good way to get my feet wet with it. However I'm limited for time with my studies and I suspect I won't be able to work on something this big until late May 2017 or later.

Here's what I currently understand about Bazel with regards to plugin-writing:

  1. Bazel uses a subset of Python called Skylark for writing extensions (Bazel's terminology for plugins AFAICT). So it may very well be that Spotless would need to be ported to Skylark first, which isn't ideal.
  2. There seem to be ways of integrating shell scripts and binaries as extensions into Bazel. I'm hoping that we can use one of these options or some another option to call spotless-lib (or a Java binary wrapper around it) without porting it to Skylark.
Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.