Skip to content

Commit

Permalink
Merge pull request #498 from numtide/tagline
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm authored Dec 17, 2024
2 parents 4c5ad32 + 855eb9a commit 2dcfe67
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

**One CLI to format your repo**
**The formatter multiplexer**

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

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

## Motivation

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

However, contributing to multiple projects requires more effort: you must change your formatter configurations each
time you switch between projects or call them manually.
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.

Formatting requires less effort with a universal formatter that supports multiple languages but is still project-specific.
What if that script was a single command?

What if that single command would handle all the formatters in parallel? And only format files that have changed since the previous run?

That's what treefmt is about.

## About treefmt

Expand Down
2 changes: 1 addition & 1 deletion cmd/init/init.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# One CLI to format the code tree - https://github.com/numtide/treefmt
# The formatter multiplexer - https://github.com/numtide/treefmt

# Do not exit with error if a configured formatter is missing
# Env $TREEFMT_ALLOW_MISSING_FORMATTER
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewRoot() (*cobra.Command, *stats.Stats) {
// create out root command
cmd := &cobra.Command{
Use: build.Name + " <paths...>",
Short: "One CLI to format your repo",
Short: "The formatter multiplexer",
Version: build.Version,
RunE: func(cmd *cobra.Command, args []string) error {
return runE(v, &statz, cmd, args)
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
site_name: Treefmt
site_url: https://treefmt.com
site_description: >-
One CLI to format your repo
The formatter multiplexer.
# Repository
repo_name: numtide/treefmt
Expand Down
2 changes: 1 addition & 1 deletion nix/packages/treefmt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ in
};

meta = with lib; {
description = "treefmt: one CLI to format your repo";
description = "treefmt: the formatter multiplexer";
homepage = "https://github.com/numtide/treefmt";
license = licenses.mit;
mainProgram = "treefmt";
Expand Down
2 changes: 1 addition & 1 deletion test/examples/nixpkgs.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# One CLI to format the code tree - https://github.com/numtide/treefmt
# The formatter multiplexer - https://github.com/numtide/treefmt

[formatter.deadnix]
command = "deadnix"
Expand Down
2 changes: 1 addition & 1 deletion test/examples/treefmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# One CLI to format the code tree - https://github.com/numtide/treefmt
# The formatter multiplexer - https://github.com/numtide/treefmt
excludes = ["*.toml"]

[formatter.python]
Expand Down

0 comments on commit 2dcfe67

Please sign in to comment.