Skip to content

Commit 2dcfe67

Browse files
authored
Merge pull request #498 from numtide/tagline
2 parents 4c5ad32 + 855eb9a commit 2dcfe67

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<img src="docs/content/assets/images/logo.svg" height="150"/>
66

7-
**One CLI to format your repo**
7+
**The formatter multiplexer**
88

99
_A <a href="https://numtide.com/">numtide</a> project._
1010

@@ -21,13 +21,15 @@ _A <a href="https://numtide.com/">numtide</a> project._
2121

2222
## Motivation
2323

24-
It’s common to format code according to the project’s standards before making contributions to any project. This task
25-
seems trivial at first sight — you can set up the required language formatter in your IDE.
24+
Modern code repositories are rarely written in a single language. They often contain a mix of languages, each with its own formatting requirements.
2625

27-
However, contributing to multiple projects requires more effort: you must change your formatter configurations each
28-
time you switch between projects or call them manually.
26+
While working for our customers, we noticed that projects each tended to re-implement the same formatter multiplexing logic. A script that invokes all the formatters.
2927

30-
Formatting requires less effort with a universal formatter that supports multiple languages but is still project-specific.
28+
What if that script was a single command?
29+
30+
What if that single command would handle all the formatters in parallel? And only format files that have changed since the previous run?
31+
32+
That's what treefmt is about.
3133

3234
## About treefmt
3335

cmd/init/init.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# One CLI to format the code tree - https://github.com/numtide/treefmt
1+
# The formatter multiplexer - https://github.com/numtide/treefmt
22

33
# Do not exit with error if a configured formatter is missing
44
# Env $TREEFMT_ALLOW_MISSING_FORMATTER

cmd/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewRoot() (*cobra.Command, *stats.Stats) {
3333
// create out root command
3434
cmd := &cobra.Command{
3535
Use: build.Name + " <paths...>",
36-
Short: "One CLI to format your repo",
36+
Short: "The formatter multiplexer",
3737
Version: build.Version,
3838
RunE: func(cmd *cobra.Command, args []string) error {
3939
return runE(v, &statz, cmd, args)

mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
site_name: Treefmt
33
site_url: https://treefmt.com
44
site_description: >-
5-
One CLI to format your repo
5+
The formatter multiplexer.
66
77
# Repository
88
repo_name: numtide/treefmt

nix/packages/treefmt/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ in
9191
};
9292

9393
meta = with lib; {
94-
description = "treefmt: one CLI to format your repo";
94+
description = "treefmt: the formatter multiplexer";
9595
homepage = "https://github.com/numtide/treefmt";
9696
license = licenses.mit;
9797
mainProgram = "treefmt";

test/examples/nixpkgs.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# One CLI to format the code tree - https://github.com/numtide/treefmt
1+
# The formatter multiplexer - https://github.com/numtide/treefmt
22

33
[formatter.deadnix]
44
command = "deadnix"

test/examples/treefmt.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# One CLI to format the code tree - https://github.com/numtide/treefmt
1+
# The formatter multiplexer - https://github.com/numtide/treefmt
22
excludes = ["*.toml"]
33

44
[formatter.python]

0 commit comments

Comments
 (0)