Skip to content

Commit

Permalink
Fixed windows paths comparison (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Leo <[email protected]>
  • Loading branch information
cdleo and Christian Leo authored Feb 16, 2022
1 parent d3e3877 commit 6bb0d49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions formatter/formatterFactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package e2hformat

import (
"fmt"
"path/filepath"
"strings"
)

Expand Down Expand Up @@ -71,6 +72,7 @@ func formatSourceFile(file string, hidingMethod HidingMethod, hidingValue string
// Utility funtion that removes the first part of the filepath til the end of `baseline` path argument
func removePathSegment(file string, baseline string) string {

file = filepath.Clean(file)
prettyCaller := strings.ReplaceAll(file, baseline, "")
if len(prettyCaller) > 0 {
return prettyCaller
Expand Down

0 comments on commit 6bb0d49

Please sign in to comment.