{"id":15517312,"url":"https://github.com/skx/alphavet","last_synced_at":"2025-04-23T04:08:40.577Z","repository":{"id":62866964,"uuid":"560980931","full_name":"skx/alphavet","owner":"skx","description":"A golang linter to detect functions not in alphabetical order","archived":false,"fork":false,"pushed_at":"2022-11-05T03:24:00.000Z","size":33,"stargazers_count":33,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T04:08:34.648Z","etag":null,"topics":["go","golang","golang-language","govet","linting"],"latest_commit_sha":null,"homepage":"https://blog.steve.fi/alphabetical_linting___.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"skx","custom":"https://steve.fi/donate/"}},"created_at":"2022-11-02T17:18:21.000Z","updated_at":"2025-01-20T19:34:22.000Z","dependencies_parsed_at":"2022-11-08T07:00:54.470Z","dependency_job_id":null,"html_url":"https://github.com/skx/alphavet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Falphavet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Falphavet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Falphavet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Falphavet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skx","download_url":"https://codeload.github.com/skx/alphavet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366721,"owners_count":21418772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","golang-language","govet","linting"],"created_at":"2024-10-02T10:12:28.711Z","updated_at":"2025-04-23T04:08:40.557Z","avatar_url":"https://github.com/skx.png","language":"Go","funding_links":["https://github.com/sponsors/skx","https://steve.fi/donate/"],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://img.shields.io/static/v1?label=godoc\u0026message=reference\u0026color=blue)](https://pkg.go.dev/github.com/skx/alphavet)\n[![Go Report Card](https://goreportcard.com/badge/github.com/skx/alphavet)](https://goreportcard.com/report/github.com/skx/alphavet)\n[![license](https://img.shields.io/github/license/skx/alphavet.svg)](https://github.com/skx/alphavet/blob/master/LICENSE)\n\n\n\n* [alphavet](#alphavet)\n  * [Installation](#installation)\n  * [Usage](#usage)\n* [Sample Output](#sample-output)\n* [Github Setup](#github-setup)\n* [Bug reports?](#bug-reports?)\n\n\n\n# alphavet\n\nThis is a simple linter which is designed to report upon functions which are not implemented in alphabetical order within files.\n\nThe motivation behind this tool was twofold:\n\n* I find it easier to navigate functions if they are ordered alphabetically.\n  * Most IDEs offer a tree/outline view which is ordered alphabetically, and the contents and the tree should match!\n* Once I realized a linter, driven by \"`go vet`\", could be named \"alphavet\" I couldn't resist the temptation to hack it up.\n  * Even though this could just has easily have been a portable Perl script.\n\n\n\n\n## Installation\n\nIf you have a working golang toolset you should be able to install by:\n\n```sh\ngo install github.com/skx/alphavet/cmd/alphavet@latest\n```\n\n\n\n## Usage\n\nThe linter is designed to be driven by `go vet` like so:\n\n```sh\n$ go vet -vettool=$(which alphavet) ./...\n```\n\nBy default the two functions `init` and `main` are excluded from the alphabetical ordering requirement.   If you wish to exclude additional functions you may do so, via the `-exclude` parameter:\n\n```sh\n$ go vet -vettool=$(which alphavet) -exclude=init,main,New ./...\n```\n\n\n\n# Sample Output\n\nSample output would look something like this:\n\n```\n$ go vet -vettool=$(which alphavet) ./...\n# github.com/skx/gobasic/builtin\n./builtin.go:67:1: function Get should have been before Register\n./misc_test.go:21:1: function LineEnding should have been before StdInput\n./misc_test.go:29:1: function StdError should have been before StdOutput\n./misc_test.go:33:1: function Data should have been before StdError\n\n```\n\n\n\n# Github Setup\n\nThis repository is configured to run tests upon every commit, and when pull-requests are created/updated.  The testing is carried out via [.github/run-tests.sh](.github/run-tests.sh) which is used by the [github-action-tester](https://github.com/skx/github-action-tester) action.\n\n\n\n# Bug reports?\n\nPlease do feel free to report any issues you see with the code, or the results.\n\nFeature requests are also welcome, although I'd prefer to avoid having excessive flags.\n\n\n\n\nSteve\n--\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Falphavet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskx%2Falphavet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Falphavet/lists"}