{"id":13764122,"url":"https://github.com/bradleyfalzon/apicompat","last_synced_at":"2025-07-29T01:32:43.441Z","repository":{"id":57496992,"uuid":"63000351","full_name":"bradleyfalzon/apicompat","owner":"bradleyfalzon","description":"apicompat checks recent changes to a Go project for backwards incompatible changes","archived":false,"fork":false,"pushed_at":"2017-02-05T09:57:05.000Z","size":141,"stargazers_count":179,"open_issues_count":7,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-05T05:51:15.433Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://abicheck.bradleyf.id.au","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/bradleyfalzon.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}},"created_at":"2016-07-10T13:39:02.000Z","updated_at":"2025-02-21T15:16:44.000Z","dependencies_parsed_at":"2022-09-03T23:50:53.316Z","dependency_job_id":null,"html_url":"https://github.com/bradleyfalzon/apicompat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bradleyfalzon/apicompat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fapicompat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fapicompat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fapicompat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fapicompat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradleyfalzon","download_url":"https://codeload.github.com/bradleyfalzon/apicompat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyfalzon%2Fapicompat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267616582,"owners_count":24116155,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-03T15:01:14.703Z","updated_at":"2025-07-29T01:32:43.170Z","avatar_url":"https://github.com/bradleyfalzon.png","language":"Go","funding_links":[],"categories":["Code Analysis","Linters","代碼分析","相关工具","代码分析","相关工具`go相关工具和插件`","Libraries for creating HTTP middlewares"],"sub_categories":["Routers","Bugs","路由","代码分析","路由器"],"readme":"# Introduction\n\n[![Build Status](https://travis-ci.org/bradleyfalzon/apicompat.svg?branch=master)](https://travis-ci.org/bradleyfalzon/apicompat) [![Coverage Status](https://coveralls.io/repos/github/bradleyfalzon/apicompat/badge.svg?branch=master)](https://coveralls.io/github/bradleyfalzon/apicompat?branch=master) [![GoDoc](https://godoc.org/github.com/bradleyfalzon/apicompat?status.svg)](https://godoc.org/github.com/bradleyfalzon/apicompat)\n\n`apicompat` is a tool to check for the introduction of backwards incompatible changes.\n\n`apicompat`:\n- Guarantees that all consumers of a library will still build without failure\n- Only checks exported declarations\n- There are no false positives (if there are, it's a bug)\n- Not every backwards incompatible change can be detected, swapping argument parameters and other changes still need to\n    be considered by the library author\n- Can be simply consumed as a library\n- Is in its infancy, see [Status](#status), feedback and review appreciated\n- Was originally named `abicheck` during early development\n\nSecondary tasks could include:\n- Detecting current semver and suggesting an appropriate increase\n- Listing all changes for help in writing release notes/commit messages.\n\nTry at [abicheck.bradleyf.id.au](https://abicheck.bradleyf.id.au/) or via CLI:\n\n```\ngo get -u github.com/bradleyfalzon/apicompat/cmd/apicompat\ncd /your/project/dir/with/committed/changes\napicompat\n```\n\n# Proposed Arguments\n\n`apicompat` also comes with a command line tool, as well as being used as a library, the following are the proposed flags\nand arguments for the command line tool.\n\n```\n-vcs    (auto|git|svn|etc) - Version control system to use (default: auto)\n-before revision           - Revisions to check as before  (default: if unstaged changes, check those, else check last two commits)\n-after  revision           - Revisions to check as after   (default: if unstaged changes, check those, else check last two commits)\n-vcsDir path               - Path to root VCS directory    (default: let VCS tool search)\n-all                       - Show non-breaking changes as well as breaking (default: false)\n\napicompat        # current package only\napicompat ./...  # check subdirectory packages\n```\n\nAnother tool, called `abichanges` may also be included which will list all detected changes to assist in producing\nrelease notes.\n\n# Status\n\n`apicompat` is currently under heavy development and refactoring. This initial version was a proof of concept and shortcuts were taken. The current tasks are focused on (but not limited to):\n\n- Adding Mercurial, SVN and potentially other VCS systems\n- Improve VCS options such as:\n    - Detection of VCS and flag to overwrite\n    - Choosing base VCS path to allow running for a different directory\n    - Filtering `vendor/` directories (if this is the best place to do it, or leave it to go/type ast packages)\n    - Check subdirectories if ran from a subdirectory of the VCS (currently checks all committed code)\n- Add docs, flow diagram and fixing of existing docs\n- Improve output formats (such as vim quickfix)\n- Move these tasks to GitHub issues\n- Once all other steps have been completed, performance will be investigated\n\n# Testing\n\nThis uses golden masters for the tests, currently (and only due to time constraints) `testdata/` directory contains `before.go`\nand `after.go`, which are before and after versions of a test package, each time `go test` is ran, the output is compared to\n`testdata/exp.txt`, which should not change.\n\nIf adding new test cases, you should expect the test to fail as the code changes should create a difference with `exp.txt`.\nThen, you'll need to update the golden master (see below), and commit those changes. If you add a new test case to `before.go` and\n`after.go`, and the tests still pass, you've uncovered a bug within `apicompat` which will need a code change to fix, once\ncode has change, the tests should fail, so update the master, review all your changes and commit.\n\n- This uses golden master `testdata/exp.txt` for the tests\n- Run tests with: `go test`\n- Update master with: `go test -args update`\n- Alternatively to do a test run: `go install \u0026\u0026 ( cd testgit; ./make.sh \u0026\u0026 apicompat )`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyfalzon%2Fapicompat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradleyfalzon%2Fapicompat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyfalzon%2Fapicompat/lists"}