{"id":19039884,"url":"https://github.com/cert-manager/boilersuite","last_synced_at":"2026-05-08T00:30:24.869Z","repository":{"id":156120437,"uuid":"632858285","full_name":"cert-manager/boilersuite","owner":"cert-manager","description":"Boilerplate checker entirely in Go","archived":false,"fork":false,"pushed_at":"2023-09-18T11:08:55.000Z","size":29,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T12:33:44.438Z","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":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cert-manager.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}},"created_at":"2023-04-26T09:21:27.000Z","updated_at":"2024-04-24T07:36:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"a85e2e96-f3d3-4241-b0df-925a9c01978a","html_url":"https://github.com/cert-manager/boilersuite","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"f12a4619a6ddbf7233e04a0d5a0596a1dc6022a2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cert-manager%2Fboilersuite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cert-manager%2Fboilersuite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cert-manager%2Fboilersuite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cert-manager%2Fboilersuite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cert-manager","download_url":"https://codeload.github.com/cert-manager/boilersuite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238671635,"owners_count":19511125,"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-08T22:19:21.896Z","updated_at":"2026-05-08T00:30:24.793Z","avatar_url":"https://github.com/cert-manager.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boilersuite\n\nBoilersuite is a tool for checking license boilerplate in cert-manager projects. It was ported to Golang from a Python script originally written for Kubernetes. That Python script was also used [in cert-manager itself](https://github.com/cert-manager/cert-manager/blob/v1.11.0/hack/verify_boilerplate.py).\n\nIt uses boilerplate template files to specify how boilerplate should look in a variety of file formats including Makefiles, go files, Dockerfiles and bash scripts.\n\nSince it's written in Go, it's easy to install in projects which already use Go (as is the case for cert-manager). Plus, it doesn't add a dependency on Python allowing for more compact CI environments which don't need to include Python.\n\n## Boilerplate Templates\n\nAll templates are in `boilerplate-templates/` and can be changed as needed. The templates are embedded into the built Go binary to ensure portability.\n\nTemplates will be interpreted as:\n\n- \"suffix type\" (e.g. `boilerplate.go.boilertmpl` will be used for `*.go` files)\n- \"prefix type\" (e.g. `boilerplate.Dockerfile.boilertmpl` will be used for `Dockerfile` or `Dockerfile.*`)\n\nAll templates can be both types, e.g. `boilerplate.go.boilertmpl` will match `main.go` and `go.mod`. There are built-in\nexceptions made for several files, including `go.mod`, `go.sum`, git directories and others.\n\n## Validation Process\n\nAssume in this example we're validating a go file, but the same applies to any supported file.\n\n0. Load and parse all templates, replacing the `\u003c\u003cAUTHOR\u003e\u003e` marker with the configured author\n1. Find the go template in the list of bundled templates\n2. Check if the file has been generated or marked to be skipped. If so, skip.\n3. Normalise the target file, removing shebang lines, Go build constraints and replacing dates with the `\u003c\u003cYEAR\u003e\u003e` marker.\n4. Normalise spaces (e.g. Windows newlines, prefixed newlines) in the target file\n5. Ensure the target file is at least as long as the template. If not, it can't possibly match and we error.\n6. Ensure the target file starts with the template. If not, we error.\n\n## Running\n\n```console\nboilersuite [--skip \"paths to skip\"] [--author \"example\"] [--verbose] \u003cpath-to-validate\u003e\n```\n\nThe `--author` parameter defaults to `cert-manager`.\n\nThe `--skip` parameter gives a list of space-separated paths which should not be validated.\n\nThe `--verbose` parameter prints output for every validated file or skipped directory.\n\nThe `\u003cpath-to-validate\u003e` can either be a directory (which will be searched recursively) or a single file.\n\nNB: The boilersuite repo (this repo!) includes a set of intentionally incorrect test fixtures under `fixture/`,\nand so that directory needs to be skipped when validating this repo specifically. See `make validate-local-boilerplate`.\n\n## Building\n\n```console\nmake build\n```\n\nAfter this, boilersuite will be available at `_bin/boilersuite`.\n\n## Testing\n\n```console\nmake test-all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcert-manager%2Fboilersuite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcert-manager%2Fboilersuite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcert-manager%2Fboilersuite/lists"}