Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: global linesep character, handle diffs (#50)
* feat: global linesep character, handle diffs Using the new `multilinediff` there needed to be two changes made: * Needed to handle diffs using the count of differences found, since the new reporter always reports something * Needed to recongize a line separation character at the engine level This PR fixes the diff handling, which was relatively trivial. However, an oversight since the beginning is that diffs never took into account the line ending being used, and assumed `\n`. This needed to be rectified, and lead to something of a re-architecture that adds `line_ending` as a setting that acts as a global override. This required simplifying the `Factory` interface a little bit, in a way that sort of simplifies it. While refactoring anyway, I also decided to simplify the line break logic, so I didn't have to repeat the same constant check everywhere. * Fixed mistakes in PR and emoji feature bug The PR removed CRLF line ending feature by accident. Also found a bug in emoji support where it fails when the yaml file is empty.
- Loading branch information
Showing
13 changed files
with
112 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package basic | ||
|
||
import "fmt" | ||
|
||
type BasicFormatterError struct { | ||
err error | ||
} | ||
|
||
func (e BasicFormatterError) Error() string { | ||
return fmt.Sprintf("basic formatter error: %v", e.err) | ||
} | ||
|
||
func (e BasicFormatterError) Unwrap() error { | ||
return e.err | ||
} | ||
|
||
func wrapBasicFormatterError(err error) error { | ||
return BasicFormatterError{err: err} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters