{"id":37204226,"url":"https://github.com/kubecub/typecheck","last_synced_at":"2026-01-14T23:32:46.351Z","repository":{"id":228968612,"uuid":"775398843","full_name":"kubecub/typecheck","owner":"kubecub","description":"Typecheck is a github actions robust tool designed for cross-platform source code type checking across all Go build platforms. This utility leverages Go’s built-in parsing and type-check libraries (`go/parser` and `go/types`) to deliver efficient and reliable code analysis.","archived":false,"fork":false,"pushed_at":"2024-03-22T02:52:44.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T07:41:02.082Z","etag":null,"topics":["actions","github-actions","go","tools","toolset","typechecker"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kubecub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-03-21T10:13:32.000Z","updated_at":"2025-04-22T13:02:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc4fd298-fc88-4d5a-a8f1-efe1215b8047","html_url":"https://github.com/kubecub/typecheck","commit_stats":null,"previous_names":["kubecub/typecheck"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/kubecub/typecheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubecub%2Ftypecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubecub%2Ftypecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubecub%2Ftypecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubecub%2Ftypecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubecub","download_url":"https://codeload.github.com/kubecub/typecheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubecub%2Ftypecheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28438550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","github-actions","go","tools","toolset","typechecker"],"created_at":"2026-01-14T23:32:45.679Z","updated_at":"2026-01-14T23:32:46.334Z","avatar_url":"https://github.com/kubecub.png","language":"Go","readme":"# Go Typecheck: Cross-Platform Source Code Type Checking for Go\n\n## Introduction\n\nGo Typecheck is a robust tool designed for cross-platform source code type checking across all Go build platforms. This utility leverages Go’s built-in parsing and type-check libraries (`go/parser` and `go/types`) to deliver efficient and reliable code analysis.\n\n## Advantages\n\n- **Speed**: A complete compilation with Go can take approximately 3 minutes. In contrast, Go Typecheck achieves this in mere seconds, significantly enhancing productivity.\n- **Resource Efficiency**: Unlike the typical requirement of over 40GB of RAM for standard processes, Typecheck operates effectively with less than 8GB of RAM. This reduction in resource consumption makes it highly suitable for a variety of systems, reducing overheads and facilitating smoother operations.\n\n## Implementation\n\nGo Typecheck employs Go's native parsing and type-checking libraries (`go/parser` and `go/types`). However, it's important to note that these libraries aren't identical to those used by the Go compiler. While occasional mismatches may occur, these libraries generally provide close approximations to the compiler's functionality, offering a reliable basis for type checking.\n\n## Error Handling\n\nTypecheck's approach to error handling is pragmatic, focusing on practicality and build continuity.\n\n**Errors reported by `go/types` but not by `go build`**:\n- **Actual Errors** (as per the specification):\n  - These should ideally be rectified. If rectification is not feasible, such as in cases of ongoing work or external dependencies in the code, these errors can be overlooked.\n    - Example: Unused variables within a closure.\n- **False Positives**:\n  - These errors should be ignored and, where appropriate, reported upstream for resolution.\n    - Example: Type mismatches between staging and generated types.\n\n**Errors reported by `go build` but not by us**:\n- CGo-related errors, including both syntax and linker issues, are outside our scope.\n\n## Usage\n\n### Github Actions\n\nTo integrate Go Code Typecheck into your GitHub Actions workflow, you can use the action available at the GitHub Marketplace. This action helps in performing type checks on your Go codebase, ensuring type safety and catching potential errors early in the development process.\n\n**Marketplace URL**: [Go Code Typecheck on GitHub Marketplace](https://github.com/marketplace/actions/go-code-typecheck)\n\n**GitHub Repository URL**: [kubecub/typecheck on GitHub](https://github.com/kubecub/typecheck)\n\nTo use this action in your workflow, include the following step in your `.github/workflows/\u003cyour-workflow\u003e.yml` file:\n\n```yml\n- name: Go Code Typecheck\n  uses: kubecub/typecheck@v1.0.0\n```\n\n**Full case presentation:**\n\n1. Create a Workflow File: In your GitHub repository, create a new file in the .github/workflows directory. You can name it anything, but for clarity, we'll call it type-check.yml.\n2. Add Workflow Content: Copy the following YAML content into your type-check.yml file. This defines a workflow that uses the \"Type Check\" action on every push and pull_request event to your repository.\n\n```yaml\nname: Go Type Check\n\non: [push, pull_request]\n\njobs:\n  go-language-code-typechecker:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v4\n\n      - name: Code Typecheck Detector\n        uses: kubecub/typecheck@main\n```\n\nThe version of the action can be specified by using the tag associated with the desired release of `kubecub/typecheck`. For example, `@v1.0.0` refers to version 0.1.3 of the action.\n\nBy incorporating this action into your workflow, you can automatically verify the type correctness of your Go code with every push or pull request, helping maintain code quality and reliability.\n\n### Locally\n\nTo run Typecheck locally, simply use the following command:\n\nFirst, go to the repository of code you need to examine：\n\n```bash\ngo install github.com/kubecub/typecheck@latest\ntypecheck\n```\n\n### Continuous Integration (CI)\n\nIn CI environments, Typecheck can be integrated into the workflow as follows:\n\n```yaml\n- name: Typecheck\n  run: make verify\n```\n\nThis streamlined process facilitates efficient error detection and resolution, ensuring a robust and reliable build pipeline.\n\nMore to learn about typecheck [share blog](https://nsddd.top/posts/concurrent-type-checking-and-cross-platform-development-in-go/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubecub%2Ftypecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubecub%2Ftypecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubecub%2Ftypecheck/lists"}