{"id":19049316,"url":"https://github.com/cppforlife/lint","last_synced_at":"2025-11-11T17:03:09.950Z","repository":{"id":16514546,"uuid":"19267579","full_name":"cppforlife/lint","owner":"cppforlife","description":"Opinionated linting for golang","archived":false,"fork":false,"pushed_at":"2014-05-05T07:22:03.000Z","size":156,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T09:25:35.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jacobSingh/tabwrangler","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cppforlife.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-29T07:22:44.000Z","updated_at":"2018-10-28T19:48:00.000Z","dependencies_parsed_at":"2022-07-14T00:20:41.687Z","dependency_job_id":null,"html_url":"https://github.com/cppforlife/lint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppforlife%2Flint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppforlife%2Flint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppforlife%2Flint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppforlife%2Flint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppforlife","download_url":"https://codeload.github.com/cppforlife/lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240105469,"owners_count":19748465,"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":[],"created_at":"2024-11-08T23:10:31.800Z","updated_at":"2025-11-11T17:03:09.832Z","avatar_url":"https://github.com/cppforlife.png","language":"Go","readme":"## Usage\n\n```\ncd $GOPATH\ngo get github.com/cppforlife/lint\ngo install github.com/cppforlife/lint\n./bin/lint github.com/cppforlife/lint\n```\n\nAutomatic fixing:\n\n```\n./bin/lint --fix github.com/cppforlife/lint\n```\n\nExample output of linting itself (test cases errors):\n\n```\nLooking at package \"github.com/cppforlife/lint/testcase/packagedirname_test\"\nLooking at package \"github.com/cppforlife/lint/testcase/packagedirname\"\n\n-- /tmp/go/src/github.com/cppforlife/lint/testcase/packagedirname/main_test.go\nmain_test.go:1:1 Test package name should match directory name with _text suffix\n\tdirName = packagedirname\n\tpackage : pkg_test -\u003e packagedirname_test\n\n-- /tmp/go/src/github.com/cppforlife/lint/testcase/packagedirname/main.go\nmain.go:1:1 Package name should match directory name\n\tdirName = packagedirname\n\tpackage : pkg -\u003e packagedirname\n\nLooking at package \"github.com/cppforlife/lint/testcase/testpackagesuffix\"\n\n-- /tmp/go/src/github.com/cppforlife/lint/testcase/testpackagesuffix/main_test.go\nmain_test.go:2:1 Test file should be in a corresponding test package\n\tfileName = main_test.go\n\tpackage : testpackagesuffix -\u003e testpackagesuffix_test\n\nLooking at package \"github.com/cppforlife/lint/testcase/packagedirnamemain_test\"\nLooking at package \"github.com/cppforlife/lint/testcase/packagedirnamemain\"\nLooking at package \"github.com/cppforlife/lint/testcase/errorassignment\"\n\n-- /tmp/go/src/github.com/cppforlife/lint/testcase/errorassignment/main.go\nmain.go:10:6 Return value of type error should be assigned and used\n\tfunc = func fmt.Printf(format string, a ...interface{}) (n int, err error)\nmain.go:13:2 Return value of type error should be assigned and used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testSe() error\nmain.go:16:2 Return value of type error should be assigned and used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testMe() (int, error)\nmain.go:19:2 Return value of type error should be assigned and used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testMe2() (int, error, error)\nmain.go:19:2 Return value of type error should be assigned and used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testMe2() (int, error, error)\nmain.go:24:5 Return value of type error should be used\n\tfunc = func fmt.Printf(format string, a ...interface{}) (n int, err error)\nmain.go:27:2 Return value of type error should be used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testSe() error\nmain.go:30:5 Return value of type error should be used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testMe() (int, error)\nmain.go:33:10 Return value of type error should be used\n\tfunc = func github.com/cppforlife/lint/testcase/errorassignment.testMe2() (int, error, error)\n\nLooking at package \"github.com/cppforlife/lint/check\"\nLooking at package \"github.com/cppforlife/lint/linter\"\nLooking at package \"github.com/cppforlife/lint/testcase\"\nLooking at package \"github.com/cppforlife/lint_test\"\nLooking at package \"github.com/cppforlife/lint\"\n````\n\n## Todo\n\n- Add `https://github.com/golang/lint` as a check\n- Check for unused/unassigned errors in defer and go stmts\n\n## Notes\n\n- http://godoc.org/go/ast\n- http://godoc.org/code.google.com/p/go.tools/go/loader\n- http://godoc.org/code.google.com/p/go.tools/go/types\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppforlife%2Flint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppforlife%2Flint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppforlife%2Flint/lists"}