{"id":17771930,"url":"https://github.com/dominikh/staticcheck-action","last_synced_at":"2025-04-05T00:10:45.047Z","repository":{"id":41521870,"uuid":"425451351","full_name":"dominikh/staticcheck-action","owner":"dominikh","description":"Staticcheck's official GitHub Action","archived":false,"fork":false,"pushed_at":"2024-03-23T17:44:47.000Z","size":16,"stargazers_count":83,"open_issues_count":0,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T14:33:37.382Z","etag":null,"topics":["actions","golang","linter","linters","static-analysis","staticcheck"],"latest_commit_sha":null,"homepage":"https://staticcheck.io/docs/running-staticcheck/github-actions/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominikh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"dominikh","github":"dominikh"}},"created_at":"2021-11-07T09:34:44.000Z","updated_at":"2024-10-19T13:04:38.000Z","dependencies_parsed_at":"2024-03-23T18:44:43.452Z","dependency_job_id":null,"html_url":"https://github.com/dominikh/staticcheck-action","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":0.1578947368421053,"last_synced_commit":"ba605356b4b29a60e87ab9404b712f3461e566dc"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikh%2Fstaticcheck-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikh%2Fstaticcheck-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikh%2Fstaticcheck-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikh%2Fstaticcheck-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominikh","download_url":"https://codeload.github.com/dominikh/staticcheck-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157275,"owners_count":20893219,"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":["actions","golang","linter","linters","static-analysis","staticcheck"],"created_at":"2024-10-26T21:37:25.368Z","updated_at":"2025-04-05T00:10:45.031Z","avatar_url":"https://github.com/dominikh.png","language":null,"funding_links":["https://patreon.com/dominikh","https://github.com/sponsors/dominikh"],"categories":[],"sub_categories":[],"readme":"# staticcheck-action\n\nThis action runs [Staticcheck](https://staticcheck.io) to find bugs and other problems in your Go code.\n\n## Usage\n\nAt its simplest, just add `dominikh/staticcheck-action` as a step in your existing workflow.\nA minimal workflow might look like this:\n\n```yaml\nname: \"CI\"\non: [\"push\", \"pull_request\"]\n\njobs:\n  ci:\n    name: \"Run CI\"\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v2\n      with:\n        fetch-depth: 1\n    - uses: dominikh/staticcheck-action@v1\n      with:\n        version: \"latest\"\n```\n\nA more advanced example that runs tests, go vet and Staticcheck on multiple OSs and Go versions looks like this:\n\n```yaml\nname: \"CI\"\non: [\"push\", \"pull_request\"]\n\njobs:\n  ci:\n    name: \"Run CI\"\n    strategy:\n      fail-fast: false\n      matrix:\n        os:  [\"windows-latest\", \"ubuntu-latest\", \"macOS-latest\"]\n        go:  [\"1.18.x\", \"1.19.x\"]\n        dir: [\"server\", \"client\"]\n    runs-on: ${{ matrix.os }}\n    steps:\n    - uses: actions/checkout@v2\n      with:\n        fetch-depth: 1\n    - uses: WillAbides/setup-go-faster@v1.14.0\n      with:\n        go-version: ${{ matrix.go }}\n    - run: \"go test ./...\"\n    - run: \"go vet ./...\"\n    - uses: dominikh/staticcheck-action@v1\n      with:\n        version: \"latest\"\n        install-go: false\n        cache-key: ${{ matrix.go }}\n        working-directory: ${{ matrix.dir }}\n```\n\n\n\nPlease see [GitHub's documentation on Actions](https://docs.github.com/en/actions) for extensive\ndocumentation on how to write and tweak workflows.\n\n## Options\n\n### `version`\n\nWhich version of Staticcheck to use.\nBecause new versions of Staticcheck introduce new checks that may break your build,\nit is recommended to pin to a specific version and to update Staticheck consciously.\n\nIt defaults to `latest`, which installs the latest released version of Staticcheck.\n\n### `min-go-version`\n\nMinimum version of Go that Staticcheck will report diagnostics for. That is, some\ndiagnostics don't apply to older versions of Go.\n\nIf unset, this will default to the Go version specified in your go.mod. The default is\nusually what you want.\n\nSee https://staticcheck.io/docs/running-staticcheck/cli/#go for more information.\n\n### `build-tags`\n\nGo build tags that get passed to Staticcheck via the `-tags` flag.\n\n### `install-go`\n\nWhether the action should install the latest version of Go to install and run Staticcheck.\nIf Staticcheck is the only action in your job, this option can usually be left on its default value of `true`.\nIf your job already installs Go prior to running Staticcheck, for example to run unit tests, it is best to set this option to `false`.\n\nThe latest release of Staticcheck works with the last minor release of Go at the time.\n\n### `cache-key`\n\nString to include in the cache key, in addition to the default, which is `runner.os`.\nThis is useful when using multiple Go versions.\n\n### `working-directory`\n\nRelative path to the working directory Staticcheck should be executed in.\nThis is useful when dealing with multiple projects within one repository.\n\nCan be easily combined with a directory [`matrix`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix),\nsee the advanced example above.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikh%2Fstaticcheck-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikh%2Fstaticcheck-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikh%2Fstaticcheck-action/lists"}