Brian McGee
23e563b239
Merge pull request #344 from numtide/fix/no-cache
...
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
fix: --no-cache
2024-07-05 22:16:05 +01:00
Brian McGee
42decbfafb
fix: --no-cache
...
Separates out the logic for detecting changes from the logic for updating the cache, fixing the case where both `--fail-on-change` and `--no-cache` are enabled.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 21:52:34 +01:00
Brian McGee
6776b9f095
Update cli/format.go
...
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
2024-07-05 21:23:13 +01:00
Brian McGee
b2000dc1ec
Update cli/format.go
...
Co-authored-by: Jonas Chevalier <zimbatm@zimbatm.com>
2024-07-05 18:26:13 +01:00
mergify[bot]
be50beb584
Merge pull request #340 from numtide/feat/reduce-stats-time-precision
...
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
Improve summary stats
2024-07-05 15:22:10 +00:00
Brian McGee
e5e1c9d326
doc: update summary statistics examples
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 16:20:35 +01:00
Brian McGee
631cf04fff
chore: remove console.log in vitepress config
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 16:18:18 +01:00
Brian McGee
da7b015190
feat: improve summary stats
...
Close #340
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 16:17:26 +01:00
Brian McGee
a64214526e
feat: display elapsed time to nearest millisecond
...
Close #337
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 16:17:26 +01:00
Brian McGee
9bbc49a0bc
Merge pull request #341 from numtide/feat/versioned-docs
...
feat: simple versioned docs
2024-07-05 16:16:38 +01:00
Brian McGee
33a7bba5b1
fix: --no-cache
...
Separates out the logic
for detecting changes from the logic for updating the cache, fixing the case where both `--fail-on-change` and `--no-cache`
are enabled.
Closes #343
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-05 16:11:22 +01:00
Brian McGee
d9f413a169
feat: simple versioned docs
...
It's a little brute force,
but since we have a small amount of docs currently it should help us in the near term
to avoid
releasing doc updates for features that have not been released yet.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-04 14:40:41 +01:00
Brian McGee
4cc7e00488
refine github workflows ( #331 )
...
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
* ci: add golangci-lint workflow
It doesn't conform to the treefmt spec so we run it here to catch any issues.
* ci: switch to buildbot
---------
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-03 19:14:42 +01:00
mergify[bot]
45cc82c105
Merge pull request #330 from numtide/feat/cache-fallback
...
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
Nix Flake Actions / nix-matrix (push) Has been cancelled
Nix Flake Actions / nix-build (push) Has been cancelled
feat: if we can't open the cache, fallback to no cache
2024-07-03 10:24:53 +00:00
Brian McGee
f266fc863b
feat: if we can't open the cache, fallback to no cache
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-03 09:40:46 +01:00
Brian McGee
39bc4464b1
Merge pull request #329 from numtide/reduce-readme
...
gh-pages / build (push) Has been cancelled
Nix Flake Actions / nix-matrix (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
Nix Flake Actions / nix-build (push) Has been cancelled
README: drop unecessary meme
2024-07-02 07:52:53 +01:00
Jörg Thalheim
9da59c7364
run deploy only on main
2024-07-02 07:43:24 +02:00
Jörg Thalheim
871701e184
README: drop unecessary meme
...
I don't think it adds much value to the project but takes up space and
attention in the README.
At the end of the day, do users care what language something is written
in?
One can implement a rollercoaster in Excel:
https://www.youtube.com/watch?v=IrVA1BBHFHw
2024-07-02 07:08:21 +02:00
Brian McGee
aa9f78b716
feat: remove release constraint on docs deployment
...
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
Nix Flake Actions / nix-matrix (push) Waiting to run
Nix Flake Actions / nix-build (push) Blocked by required conditions
Need a better story
to keep docs changes for new features away from the website
before they're released,
but in the short term we need
to be able to push out edits and fixes without releasing.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-01 20:26:11 +01:00
mergify[bot]
33d2f60701
Merge pull request #325 from numtide/fix/global-excludes
...
fix: configure toml keys for config fields
2024-07-01 15:52:48 +00:00
mergify[bot]
a77db5291d
Merge branch 'main' into fix/global-excludes
2024-07-01 15:52:15 +00:00
mergify[bot]
c3e3c05128
Merge pull request #326 from numtide/fix/global-excludes-docs
...
doc: fix global excludes config example
2024-07-01 15:32:59 +00:00
mergify[bot]
e1f16c8370
Merge branch 'main' into fix/global-excludes-docs
2024-07-01 15:32:26 +00:00
Brian McGee
2e05603d1e
fix: configure toml tags for config fields
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-01 16:30:34 +01:00
mergify[bot]
e065ac9a2a
Merge pull request #328 from flokli/no-cache-fix
...
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
Nix Flake Actions / nix-matrix (push) Waiting to run
Nix Flake Actions / nix-build (push) Blocked by required conditions
fix: only try opening the cache if cache is enabled
2024-07-01 14:47:36 +00:00
Florian Klink
601af09772
fix: only try opening the cache if cache is enabled
...
Otherwise `--no-cache` still fails to open the cache.
2024-07-01 17:40:12 +03:00
Brian McGee
7d7815e1aa
doc: fix global excludes config example
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-01 14:30:37 +01:00
mergify[bot]
ab9f831d72
Merge pull request #323 from numtide/feat/blueprint
...
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
Nix Flake Actions / nix-matrix (push) Waiting to run
Nix Flake Actions / nix-build (push) Blocked by required conditions
feat: use numtide/blueprint instead of flake.parts
2024-06-30 11:26:54 +00:00
mergify[bot]
ff5380aaa2
Merge branch 'main' into feat/blueprint
2024-06-30 11:26:22 +00:00
Brian McGee
aea75cdeb1
feat: remove CGO dependencies and disable
...
Not required
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-30 12:25:00 +01:00
Brian McGee
986f020c3d
feat: use numtide/blueprint instead of flake.parts
...
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-30 12:25:00 +01:00
mergify[bot]
492083b03e
Merge pull request #322 from isbecker/docs/treefmt-vscode
...
gh-pages / build (push) Has been cancelled
Nix Flake Actions / nix-matrix (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
Nix Flake Actions / nix-build (push) Has been cancelled
docs: adds information regarding IDE integration in vscode
2024-06-28 19:25:34 +00:00
Ian Becker
e02f853229
docs: adds information regarding IDE integration in vscode
2024-06-25 15:46:27 -04:00
Brian McGee
30d30b54f0
Merge pull request #321 from numtide/softer-cancel
...
Softer cancel
2024-06-15 11:28:48 +01:00
zimbatm
e29107d3ee
fix: only cancel formatters on background errors
...
If any of the formatting action returns an error, keep going to surface
as many errors as possible.
If the user hits Ctrl-C then terminate everything.
2024-06-15 11:57:57 +02:00
Brian McGee
4e8daacca3
Merge pull request #320 from numtide/golangci-lint
...
chore: do a golangci-lint pass
2024-06-14 14:20:32 +01:00
zimbatm
c68261e979
fix: stop hard-killing formatters
...
Give the processes some chance to clean after themselves.
Fixes https://github.com/numtide/treefmt/issues/316#issuecomment-2160628891
2024-06-14 14:11:23 +02:00
Jonas Chevalier
6b591255b1
test: add tests for glob matching ( #319 )
...
This helps demonstrate how our globbing works.
2024-06-14 12:57:51 +02:00
zimbatm
6d6a71a3ca
chore: do a golangci-lint pass
...
golangci-lint doesn't follow the treefmt spec so it can't be integrated
with treefmt unfortunately.
2024-06-14 12:32:57 +02:00
mergify[bot]
251012657a
Merge pull request #318 from numtide/feat/improve-unmatched
...
feat: improve unmatched logic
2024-06-14 09:36:20 +00:00
Brian McGee
56d8561125
feat: improve unmatched logic
...
Separates global excludes processing from `Formatter.Wants`. This removes redundant processing of global excludes in each `Formatter.Wants` call.
If a file has been globally excluded, we do not emit an `on-unmatched` log message. This should help reduce as reported in #317 .
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-14 10:31:47 +01:00
mergify[bot]
2ca613901d
Merge pull request #315 from numtide/dependabot/github_actions/goreleaser/goreleaser-action-6
...
chore(deps): bump goreleaser/goreleaser-action from 5 to 6
2024-06-11 07:56:04 +00:00
dependabot[bot]
57b907d99d
chore(deps): bump goreleaser/goreleaser-action from 5 to 6
...
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action ) from 5 to 6.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases )
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 17:55:16 +00:00
mergify[bot]
51640c85d3
Merge pull request #314 from katexochen/cli-no-global-state
...
cli: remove global state, init function usage
2024-06-07 08:16:03 +00:00
Paul Meyer
c07305e6b0
cli: remove global state, init function usage
...
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-06-06 20:28:37 +02:00
Brian McGee
ab2b373094
Merge pull request #313 from numtide/fix/stdin
...
fix: --stdin flag
2024-06-05 15:13:52 +01:00
Brian McGee
089eb171a0
fix: --stdin flag
...
This was incorrectly ported from Rust to Go.
When `--stdin` is provided, `treefmt` copy the `stdin` into a temporary file, using the first path argument as the filename. This allows the user to control which formatters will match this temp file based on their `treefmt` config.
After the formatters have been applied, the contents of this temporary file are then printed to stdout and the temp file is removed.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-05 15:06:10 +01:00
Brian McGee
4f086c204e
Revert "fix: --stdin flag"
...
This reverts commit 9934a5764d
.
2024-06-04 17:05:56 +01:00
Brian McGee
9934a5764d
fix: --stdin flag
...
This was incorrectly ported from Rust to Go.
When provided, `treefmt` will take the contents of stdin and place them into the file provided with the `--stdin` flag, then format it according to the configured formatters.
If the file doesn't exist it is created. If it exists, it is first truncated and then populated with stdin.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-03 17:07:34 +01:00
mergify[bot]
2454542a36
Merge pull request #309 from numtide/find-tree-root
...
cli: search for the tree root by default
2024-05-30 18:09:47 +00:00