All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Bool
NoColor
to disable color output separately from fatih/color. - Method
Ctx.ErrorLine() string
returns a single line error message. - Parse error messages printed by
go test
. - Command line arguments are run as given. Stdout and stderr are pretty printed along the way.
1.0.0 - 2017-01-21
- Global integer
DefaultContext
allows you to override the default amount of context lines (default 0). - Function
NewFromPath(path string, region ctxerr.Region) (ctxerr.Ctx, error)
returns a new Ctx based on a path to an existing file. - Method
Ctx.Error()
implementing the error interface, replacingCtx.String()
. - Function
Parse(line string) (*Ctx, error)
parses typical linter output into Ctx structs. Returns errorErrNoMatch
when unlikely to be a linter error.- Currently supports output of
gometalinter
andnpm run lint
.
- Currently supports output of
- Command
ctx
enhances stdin with pretty errors and optional context.
- Exported Position (a Region consists of two position).
- Exported all fields of Ctx and Region.
- Proper handling of Region with zero columns. It is now treated as a full line.
- Methods of
Ctx
:WithPath
,WithContext
andWithHint
as they're now exported as fields. - Struct
Error
and methodCtx.ToError()
. Use the exportedErr
field ofCtx
instead.
- Tabs are now properly handled when padding and pointing to regions.
- No more panic when pointing outside of the line (to the right).
- Initial public release.