{"id":19220414,"url":"https://github.com/louisbrunner/gofixit","last_synced_at":"2025-06-21T10:06:56.314Z","repository":{"id":57709046,"uuid":"504813725","full_name":"LouisBrunner/gofixit","owner":"LouisBrunner","description":"gofixit is a language-agnostic linter which enforces that your TODOs and FIXMEs are dealt with in time","archived":false,"fork":false,"pushed_at":"2023-02-24T09:19:18.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-21T10:06:37.226Z","etag":null,"topics":["ci","fixme","linter","linting","todo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LouisBrunner.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":"2022-06-18T10:37:02.000Z","updated_at":"2022-06-22T09:18:08.000Z","dependencies_parsed_at":"2024-06-21T02:14:01.109Z","dependency_job_id":"b674b676-0efd-4812-b06e-fc2928ee2328","html_url":"https://github.com/LouisBrunner/gofixit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LouisBrunner/gofixit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fgofixit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fgofixit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fgofixit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fgofixit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LouisBrunner","download_url":"https://codeload.github.com/LouisBrunner/gofixit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisBrunner%2Fgofixit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261103453,"owners_count":23109932,"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":["ci","fixme","linter","linting","todo"],"created_at":"2024-11-09T14:35:05.073Z","updated_at":"2025-06-21T10:06:51.281Z","avatar_url":"https://github.com/LouisBrunner.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `gofixit`\n\nYou work on a new task, encounter a difficult problem or something you don't want to implement yet, you drop a `TODO` and move on, then some time later production break because you forgot about it... has this ever happened to you?\n\n`gofixit` is a language-agnostic linter which enforces that your TODOs and FIXMEs are dealt with in time, very similar to [this eslint plugin](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md).\n\n## Example\n\nFile (`examples/example1.c`):\n```c\n#include \u003cstdio.h\u003e\n\nvoid doSomething() {\n  // TODO[2022-06-15]: implement later\n  assert((\"unimplemented\", 0));\n}\n\n\nint main() {\n  doSomething()\n}\n```\n\nResult (with `gofixit --files examples/example1.c --strict` as of 2022-06-19):\n```\nexamples/example1.c:4 TODO now overdue for 4 days 13 hours\nexamples/example1.c:12 FIXME missing expiry date\n```\n\n## Installation\n\n```\ngo install github.com/LouisBrunner/gofixit@latest\n```\n\n## Usage\n\n```\ngofixit\n```\n\nThe program will log all issues to stdout and return status code:\n\n * `1` if it failed because there was one or more issue\n * `2` when it failed for an internal reason (including when using `-h` or `--help`)\n\n### Configuration\n\n`gofixit` supports getting settings through:\n\n * Environment variables: all env vars must be prefixed with `GOFIXIT_` and be in all caps\n * Configuration file: any file named `.gofixit.config.toml` in the current directory or any parent will be used, it must be a TOML formatted file\n * Command-line arguments: flag names use `kebab-case` instead of `PascalCase` as for the configuration file\n\nAll settings can be set through any of those sources, they are ordered by ascending priority (environment variables \u003c configuration file \u003c command line arguments).\n\nSettings:\n\n * `CommentPrefixes`: strings which define what a comment definition looks like (default `[//,#,/*]`)\n * `Prefixes`: strings which define what a TODO looks like (default `[TODO,FIXME]`)\n * `CaseSensitive`: should prefixes be matched as case sensitive or not (default `true`)\n * `ExpiryPattern`: Go template used to generate a regex to match the prefix and expiry date together, careful of escaping any regex character in here (default `\"{{.Prefix}}(?:\\\\[{{.Date}}\\\\])?\"`), see [here](https://pkg.go.dev/text/template) for details about Go templating and [here](https://github.com/google/re2/wiki/Syntax) for details about Go regex\n * `DateLayout`: date layout format, as specified by Golang's date parsing (default `\"2006-01-02\"`), see [here](https://pkg.go.dev/time#Parse) for more details about format\n * `Strict`: will force all matched comments to have an expiry date\n * `NoRecursive`: disable processing directories recursively (default `false`)\n * `Files`: list of files to parse (default `[.]`)\n * `FilesExcludePatterns`: list of patterns used to exclude files or directories\n * `LoggingLevel`: logrus log level for internal debugging (default `\"fatal\"`)\n\nExample:\n\n```bash\n# CommentPrefixes can be set through all these mechanisms\n\n# Environment variable\nGOFIXIT_COMMENTPREFIXES='//,/*' gofixit\n\n# Configuration file\ncat \u003e .gofixit.config.toml \u003c\u003cHEREDOC\nCommentPrefixes = ['//', '/*']\nHEREDOC\ngofixit\n\n# Command-line argument\ngofixit --comment-prefixes='//,/*'\n```\n\n\n## Issues\n\n * Using date layout with variable amount of digits (e.g. `6` instead of `06`) or with letters (e.g. `Jun` instead of `06`) is currently broken\n * No way to configure the utility\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrunner%2Fgofixit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisbrunner%2Fgofixit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisbrunner%2Fgofixit/lists"}