Skip to content
/ sorted Public

Go linter that makes your code alphabetically sorted

License

Notifications You must be signed in to change notification settings

ravsii/sorted

Repository files navigation

Sorted Build Test

sorted is the linter for keeping everything sorted.

At the moment it only checks for a few things, with plans for checking everything that could be checked for any sort of ordering.

So what's working?

It can be generalized into 2 main categories for now, that are

  • Blocks

    const (
        B = iota // B, A are not sorted alphabetically
        A
    )
  • Multiple inline identifiers

    const c, b, a = 0, 0, 0 // single line idents are not sorted alphabetically

TODO

  • Options for turning stuff on/off
  • const, var
    • Alphabetical sorting
  • struct
    • Alphabetical sorting
  • switch (maybe?)
  • imports (pretty much what gci does with some more)
  • func
    • Alphabetical sorting
    • Public/Private sorting
  • Generics

About

Go linter that makes your code alphabetically sorted

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published