Skip to content

Release v3.0.0

Compare
Choose a tag to compare
@xobotyi xobotyi released this 28 Mar 09:10
· 46 commits to master since this release
60bbf51

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