Commit Graph

308 Commits

Author SHA1 Message Date
renovate[bot]
cb0fd37ad9
chore(deps): update dependency vitepress to v1.3.2 2024-08-07 18:01:19 +00:00
Brian McGee
1884c8a984
Merge pull request #374 from numtide/renovate/github.com-go-git-go-git-v5-digest
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
fix(deps): update github.com/go-git/go-git/v5 digest to db559f1
2024-08-07 15:24:24 +01:00
renovate[bot]
4b47080dff
fix(deps): update github.com/go-git/go-git/v5 digest to db559f1 2024-08-07 14:19:02 +00:00
Brian McGee
33b704c71f
Merge pull request #372 from numtide/renovate/github.com-go-git-go-billy-v5-digest
fix(deps): update github.com/go-git/go-billy/v5 digest to fac749f
2024-08-07 15:18:21 +01:00
renovate[bot]
a09b6c24a1
fix(deps): update github.com/go-git/go-billy/v5 digest to fac749f 2024-08-07 15:16:27 +01:00
Brian McGee
3035f7f9c8
Merge pull request #370 from numtide/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.8.0
2024-08-07 15:12:46 +01:00
Brian McGee
ed8b898185
feat: add .env.local support 2024-08-07 15:04:18 +01:00
renovate[bot]
b2d05e4cf9
fix(deps): update module golang.org/x/sync to v0.8.0 2024-08-07 15:04:18 +01:00
Brian McGee
dae884ce50
Merge pull request #368 from numtide/feat/ci-flag
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
CI flag
2024-08-07 11:23:41 +01:00
renovate[bot]
2d583a9627
fix(deps): update github.com/go-git/go-git/v5 digest to b430952 (#369)
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-06 21:33:03 +02:00
Brian McGee
d4aaba9dc2
feat: ci mode
Adds a ci flag which does the following:

- ensures INFO level logging at a minimum
- --no-cache
- --fail-on-change

This also adds a delay on startup which is intended to ensure we do not start doing anything until we have moved into the second after the one in which the process started. This helps to ensure accurate comparisons of `modtime` using truncated second-level precision for change detection.

This is only an issue in scenarios in which treefmt is being executed quickly in succession or directly after an automatic checkout, such as in CI.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 17:09:10 +01:00
Brian McGee
e3844660d2
fix: unset $PRJ_ROOT before running the repo's treefmt locally with treefmt-nix
`numtide/devshell` sets $PRJ_ROOT, which is used to default `--tree-root`. This conflicts with `--tree-root-file` being set by `treefmt-nix`.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 16:56:04 +01:00
Brian McGee
e304d7a0cc
chore: fmt
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 16:25:07 +01:00
Brian McGee
ce46fa5c45
chore: update flake inputs.
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 16:24:55 +01:00
Brian McGee
5591e7e9a2
Merge pull request #360 from numtide/renovate/vitepress-1.x-lockfile
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
chore(deps): update dependency vitepress to v1.3.1
2024-08-01 15:38:37 +01:00
Brian McGee
7f6bfe72cd
chore: update docs FOD
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 15:35:19 +01:00
renovate[bot]
96bc8a1db2
chore(deps): update dependency vitepress to v1.3.1 2024-08-01 15:33:08 +01:00
Brian McGee
e0c3eefacf
chore: update gomod2nix
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-08-01 15:32:11 +01:00
mergify[bot]
8b153825cc
Merge pull request #363 from numtide/renovate/github.com-burntsushi-toml-1.x
fix(deps): update module github.com/burntsushi/toml to v1.4.0
2024-08-01 14:29:49 +00:00
mergify[bot]
7fbe1f62b6
Merge branch 'main' into renovate/github.com-burntsushi-toml-1.x 2024-08-01 14:29:17 +00:00
mergify[bot]
c5d4a17c72
Merge pull request #367 from numtide/renovate/github.com-go-git-go-billy-v5-digest
fix(deps): update github.com/go-git/go-billy/v5 digest to 69f6dc8
2024-08-01 14:28:37 +00:00
renovate[bot]
8a65f400b4
fix(deps): update module github.com/burntsushi/toml to v1.4.0 2024-08-01 14:28:28 +00:00
renovate[bot]
26765d04e4
fix(deps): update github.com/go-git/go-billy/v5 digest to 69f6dc8 2024-08-01 14:27:48 +00:00
Brian McGee
a7d4988f5a
Merge pull request #362 from numtide/renovate/github.com-adrg-xdg-0.x
fix(deps): update module github.com/adrg/xdg to v0.5.0
2024-08-01 15:27:20 +01:00
renovate[bot]
06066498ec
fix(deps): update module github.com/adrg/xdg to v0.5.0 2024-08-01 08:33:36 +00:00
Brian McGee
9668e89576
Merge pull request #359 from numtide/renovate/github.com-go-git-go-git-v5-digest
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
fix(deps): update github.com/go-git/go-git/v5 digest to 61f8d68
2024-08-01 09:32:56 +01:00
renovate[bot]
fac7d8fdd4
fix(deps): update github.com/go-git/go-git/v5 digest to 61f8d68 2024-08-01 04:52:45 +00:00
renovate[bot]
4b33ba369d
Add renovate.json (#358)
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 11:45:44 +02:00
mergify[bot]
e9bf08d0b6
Merge pull request #357 from mattalxndr/pr
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
Fixed broken URLs
2024-07-23 07:21:42 +00:00
Matt Alexander
52d8c48ec0 Update nixpkgs.toml 2024-07-22 16:05:10 -05:00
Matt Alexander
17c1785d56
Update treefmt.toml 2024-07-22 16:00:03 -05:00
mergify[bot]
dabe2aa4cb
Merge pull request #356 from numtide/dot-treefmt-toml
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
feat: search for .treefmt.toml
2024-07-21 10:40:10 +00:00
zimbatm
bc1ae33535 feat: search for .treefmt.toml
This restores treefmt v1 compatibility by also searching for the dot
prefixed version of the config file.

Fixes #355
2024-07-21 12:14:06 +02:00
mergify[bot]
6df86ef974
Merge pull request #354 from numtide/prj-root
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
fix(cli): restore PRJ_ROOT env var
2024-07-20 06:57:56 +00:00
zimbatm
43c2071975 fix(cli): restore PRJ_ROOT env var
PRJ_ROOT is coming from the https://github.com/numtide/prj-spec and was
used in treefmt 1.x

Fixes #353
2024-07-20 08:55:49 +02:00
mergify[bot]
debc3e49df
Merge pull request #347 from numtide/dependabot/github_actions/actions/checkout-4
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
chore(deps): bump actions/checkout from 3 to 4
2024-07-10 20:12:29 +00:00
mergify[bot]
18e0ae2ee7
Merge branch 'main' into dependabot/github_actions/actions/checkout-4 2024-07-10 20:11:56 +00:00
Brian McGee
5afe6441e6
Merge pull request #348 from numtide/fix/relative-path-resolution
Some checks are pending
gh-pages / build (push) Waiting to run
gh-pages / deploy (push) Blocked by required conditions
golangci-lint / lint (push) Waiting to run
fix: relative path resolution in filesystem walker
2024-07-10 11:58:48 +01:00
Brian McGee
0953dd58f2
feat: refactor relative path function for git walker
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-09 19:45:38 +01:00
Brian McGee
0a8ffe0c63
feat: move filtering of directories and symlinks into walker implementations
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-09 19:21:09 +01:00
Brian McGee
ff8b1ed367
feat: refactor relative path function for filesystem walker
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-09 19:12:06 +01:00
Brian McGee
a018c297d9
fix: relative path resolution in filesystem walker
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-07-09 13:41:28 +01:00
dependabot[bot]
fef1caf33f
chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 17:02:06 +00:00
Brian McGee
65152cb373
Merge pull request #345 from numtide/fix/fail-on-change
Some checks failed
gh-pages / build (push) Has been cancelled
golangci-lint / lint (push) Has been cancelled
gh-pages / deploy (push) Has been cancelled
fix: use second precision when comparing file mod times
2024-07-07 11:17:11 +01:00
Brian McGee
85ce0a2f74
fix: use second precision when comparing file mod times
We were using whatever precision the underlying file system was giving us, and in some cases that can be very detailed. Some formatters mess with the mod time, but not to the same precision (e.g. dos2unix).

POSIX also specifies that mod time should be EPOCH (second) precision.

This change brings us back in line with how 1.x worked, and should resolve issues with false fail on change errors.
2024-07-06 17:38:43 +01:00
Brian McGee
23e563b239
Merge pull request #344 from numtide/fix/no-cache
Some checks failed
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
Some checks are pending
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