diffplug / diffplug/spotless

Better method for managing clang-format binaries

Open
#673 14 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 14h
Merged PRs (30d)
43

Description

We are able to call `clang-format` by shelling out to it on the system path, and we are able to cache its results by enforcing a version check on the binary. However, if it isn't on the path, or the version is wrong, we just show a helpful error message and let the user figure it out from there:

https://github.com/diffplug/spotless/blob/608e128381c89260f8a38fba985415c1f962ec7b/lib/src/main/java/com/diffplug/spotless/cpp/ClangFormatStep.java#L70-L83

It would be nice if we could handle this better, or at least have better instructions.

Contributor guide

Open the contributing guide

Research direction

Start with lib/src/main/java/com/diffplug/spotless/cpp/ClangFormatStep.java at the linked lines, and read the existing system-path lookup, version check, and error handling. Review the issue discussion for an agreed direction; done should mean a clearer way to handle missing or mismatched clang-format binaries, or instructions that let users resolve those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.