Skip to content

Commit

Permalink
feat: refactor processing
Browse files Browse the repository at this point in the history
Simplifies the overall processing pipeline, making it easier to follow and reason about.

Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed Oct 16, 2024
1 parent 2176102 commit 1c293d5
Show file tree
Hide file tree
Showing 11 changed files with 497 additions and 469 deletions.
352 changes: 39 additions & 313 deletions cmd/format/format.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func TestCache(t *testing.T) {

// running should match but not format anything
_, statz, err = treefmt(t, "--config-file", configPath, "--tree-root", tempDir)
as.ErrorIs(err, formatCmd.ErrFormattingFailures)
as.ErrorIs(err, format.ErrFormattingFailures)

assertStats(t, as, statz, map[stats.Type]int{
stats.Traversed: 32,
Expand All @@ -494,7 +494,7 @@ func TestCache(t *testing.T) {

// running again should provide the same result
_, statz, err = treefmt(t, "--config-file", configPath, "--tree-root", tempDir)
as.ErrorIs(err, formatCmd.ErrFormattingFailures)
as.ErrorIs(err, format.ErrFormattingFailures)

assertStats(t, as, statz, map[stats.Type]int{
stats.Traversed: 32,
Expand Down
94 changes: 0 additions & 94 deletions format/cache.go

This file was deleted.

Loading

0 comments on commit 1c293d5

Please sign in to comment.