Skip to content

Releases: GaijinEntertainment/go-exhaustruct

v3.3.0

27 May 09:24
5f38877
Compare
Choose a tag to compare
  • Improve support of returns containing errors [#102]
    Linter now able to detect types that satisfy error interface. More in README

Release v3.2.0

04 Jan 15:48
5001d9b
Compare
Choose a tag to compare
  • Add support for comment directives [#88]
    Linter now supports two directives: //exhaustruct:ignore and //exhaustruct:enforce - more in readme.

Release v3.1.0

17 Jul 14:06
c7dc19f
Compare
Choose a tag to compare
  • Allow matching and exclusion of anonymous structs by declaring <anonymous> alias (#65)
    Fix: #62

Release v3.0.0

28 Mar 09:10
60bbf51
Compare
Choose a tag to compare

As of issues with generics and unnamed initializations linter have been completely refactored - it is easier to treat it a ground-up new linter:

  • Linter now uses WithStack traversal - it is simplified and improved detection of structure being initialized within return statement.
  • Generics support
    fix: #39
    close: #40
  • Slice and map expressions support
    fix: #32
  • Due to overall algorithm simplification and optimisations - raw analysis time sligntly decresed for large codebases.
  • Testing improvements
  • (BREAKING CHANGE!) Regular Expressions matching reworked
    Previously: type is matched even if match is partial.
    Now: type is matched only if it is a full match of full type name (including the package name).
  • (BREAKING CHANGE!) Repository structure changed
    Previously: analyzer constructor exposed on /pkg/analyzer subpath.
    Now: analyzer constructor exposed on /analyzer subpath.
  • (BREAKING CHANGE!) Only top level structures allowed to be unintialized during error return.
    Previously: nested structures initialization within error-containing return have been allowed to stay unintialized.
    return typ1{nested: typ2{}}, errors.New("some err")
    Now: above code will yield linting error alike pkgName.typ2 is missing field A
  • (BREAKING CHANGE!) Error message has changed.
    Previously: A, B, C, D ..., Z are missing in TestType
    Now: pkgName.TestType is missing fields A, B, C, D ..., Z

Release v2.3.0

15 Aug 09:00
12f9132
Compare
Choose a tag to compare

Features

  • add ability to mark field as optional with help of field tag.

v.2.2.2 Release

29 Jul 09:27
Compare
Choose a tag to compare
  • Update golang.org/x/tools dependency

v2.2.1 Release

29 Jul 09:14
375abff
Compare
Choose a tag to compare
  • Fix panic occured on multiple local same-name types with different amount of fields.

v2.2.0 Release

10 Jun 11:34
2a7dfaf
Compare
Choose a tag to compare
  • Performance improvements:

    • Add type check desicion cache.
    • Add structures fields cache.

    ~40% perfomance improvement on codebase with 130k LOC.

v2.1.0 Release

30 Apr 10:18
Compare
Choose a tag to compare
  • Make NewAnalyzer return an error instead of panic.
  • A bit of code cleanup and slight optimisations.

v2.0.1 Release

10 Apr 10:13
Compare
Choose a tag to compare

Fix go.mod version