{"id":13471590,"url":"https://github.com/golang/lint","last_synced_at":"2025-10-05T17:31:47.542Z","repository":{"id":37404714,"uuid":"10443324","full_name":"golang/lint","owner":"golang","description":"[mirror] This is a linter for Go source code. (deprecated)","archived":true,"fork":false,"pushed_at":"2021-05-08T22:21:20.000Z","size":358,"stargazers_count":3973,"open_issues_count":0,"forks_count":492,"subscribers_count":102,"default_branch":"master","last_synced_at":"2024-10-29T16:59:48.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-02T22:45:37.000Z","updated_at":"2024-10-28T12:44:01.000Z","dependencies_parsed_at":"2022-08-02T11:52:39.581Z","dependency_job_id":null,"html_url":"https://github.com/golang/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/golang%2Flint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Flint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Flint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Flint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang","download_url":"https://codeload.github.com/golang/lint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235424998,"owners_count":18988326,"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-07-31T16:00:47.029Z","updated_at":"2025-10-05T17:31:42.246Z","avatar_url":"https://github.com/golang.png","language":"Go","funding_links":[],"categories":["Misc","开源类库","Go","代码分析","Code Analysis","Code Checking","Open source library","Linters","Programming Languages","相关工具","[](https://github.com/golang/go/wiki/CodeTools#code-formatting)Code Formatting","Libraries for creating HTTP middlewares","相关工具`go相关工具和插件`"],"sub_categories":["代码分析","Routers","Contents","HTTP Load testing","Code Analysis","Style and Patterns Checking","Go","Middlewares","[](https://github.com/golang/go/wiki/CodeTools#tools)Tools","路由器"],"readme":"**NOTE:** Golint is [deprecated and frozen](https://github.com/golang/go/issues/38968).\nThere's no drop-in replacement for it, but tools such as [Staticcheck](https://staticcheck.io/)\nand `go vet` should be used instead.\n\nGolint is a linter for Go source code.\n\n[![Go Reference](https://pkg.go.dev/badge/golang.org/x/lint.svg)](https://pkg.go.dev/golang.org/x/lint)\n[![Build Status](https://travis-ci.org/golang/lint.svg?branch=master)](https://travis-ci.org/golang/lint)\n\n## Installation\n\nGolint requires a\n[supported release of Go](https://golang.org/doc/devel/release.html#policy).\n\n    go get -u golang.org/x/lint/golint\n\nTo find out where `golint` was installed you can run `go list -f {{.Target}} golang.org/x/lint/golint`. For `golint` to be used globally add that directory to the `$PATH` environment setting.\n\n## Usage\n\nInvoke `golint` with one or more filenames, directories, or packages named\nby its import path. Golint uses the same\n[import path syntax](https://golang.org/cmd/go/#hdr-Import_path_syntax) as\nthe `go` command and therefore\nalso supports relative import paths like `./...`. Additionally the `...`\nwildcard can be used as suffix on relative and absolute file paths to recurse\ninto them.\n\nThe output of this tool is a list of suggestions in Vim quickfix format,\nwhich is accepted by lots of different editors.\n\n## Purpose\n\nGolint differs from gofmt. Gofmt reformats Go source code, whereas\ngolint prints out style mistakes.\n\nGolint differs from govet. Govet is concerned with correctness, whereas\ngolint is concerned with coding style. Golint is in use at Google, and it\nseeks to match the accepted style of the open source Go project.\n\nThe suggestions made by golint are exactly that: suggestions.\nGolint is not perfect, and has both false positives and false negatives.\nDo not treat its output as a gold standard. We will not be adding pragmas\nor other knobs to suppress specific warnings, so do not expect or require\ncode to be completely \"lint-free\".\nIn short, this tool is not, and will never be, trustworthy enough for its\nsuggestions to be enforced automatically, for example as part of a build process.\nGolint makes suggestions for many of the mechanically checkable items listed in\n[Effective Go](https://golang.org/doc/effective_go.html) and the\n[CodeReviewComments wiki page](https://golang.org/wiki/CodeReviewComments).\n\n## Scope\n\nGolint is meant to carry out the stylistic conventions put forth in\n[Effective Go](https://golang.org/doc/effective_go.html) and\n[CodeReviewComments](https://golang.org/wiki/CodeReviewComments).\nChanges that are not aligned with those documents will not be considered.\n\n## Contributions\n\nContributions to this project are welcome provided they are [in scope](#scope),\nthough please send mail before starting work on anything major.\nContributors retain their copyright, so we need you to fill out\n[a short form](https://developers.google.com/open-source/cla/individual)\nbefore we can accept your contribution.\n\n## Vim\n\nAdd this to your ~/.vimrc:\n\n    set rtp+=$GOPATH/src/golang.org/x/lint/misc/vim\n\nIf you have multiple entries in your GOPATH, replace `$GOPATH` with the right value.\n\nRunning `:Lint` will run golint on the current file and populate the quickfix list.\n\nOptionally, add this to your `~/.vimrc` to automatically run `golint` on `:w`\n\n    autocmd BufWritePost,FileWritePost *.go execute 'Lint' | cwindow\n\n\n## Emacs\n\nAdd this to your `.emacs` file:\n\n    (add-to-list 'load-path (concat (getenv \"GOPATH\")  \"/src/golang.org/x/lint/misc/emacs/\"))\n    (require 'golint)\n\nIf you have multiple entries in your GOPATH, replace `$GOPATH` with the right value.\n\nRunning M-x golint will run golint on the current file.\n\nFor more usage, see [Compilation-Mode](http://www.gnu.org/software/emacs/manual/html_node/emacs/Compilation-Mode.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Flint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang%2Flint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Flint/lists"}