{"id":13671098,"url":"https://github.com/JohnPostlethwait/fixme","last_synced_at":"2025-04-27T14:33:03.922Z","repository":{"id":23434258,"uuid":"26797399","full_name":"JohnPostlethwait/fixme","owner":"JohnPostlethwait","description":"Scan for NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, and BUG comments within your source, and print them to stdout so you can deal with them.","archived":false,"fork":false,"pushed_at":"2024-06-19T06:20:41.000Z","size":65,"stargazers_count":205,"open_issues_count":1,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-26T05:40:41.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://johnpostlethwait.github.io/fixme","language":"JavaScript","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/JohnPostlethwait.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":"2014-11-18T07:30:19.000Z","updated_at":"2025-04-08T04:04:06.000Z","dependencies_parsed_at":"2024-06-18T15:18:48.848Z","dependency_job_id":"e846e842-8c24-45b2-bbed-e5ee6f98d265","html_url":"https://github.com/JohnPostlethwait/fixme","commit_stats":{"total_commits":41,"total_committers":13,"mean_commits":"3.1538461538461537","dds":0.6341463414634146,"last_synced_commit":"9d03db8c104564d458ec66af552e5dd9cda17543"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnPostlethwait%2Ffixme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnPostlethwait%2Ffixme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnPostlethwait%2Ffixme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnPostlethwait%2Ffixme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnPostlethwait","download_url":"https://codeload.github.com/JohnPostlethwait/fixme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251154279,"owners_count":21544471,"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-08-02T09:00:58.993Z","updated_at":"2025-04-27T14:33:03.587Z","avatar_url":"https://github.com/JohnPostlethwait.png","language":"JavaScript","readme":"# Fixme\n\n_**NOTE:** I no longer actively maintain this package. I'd love to get PRs to keep it going though!_\n\n![Fixme](https://nodei.co/npm/fixme.png \"Fixme on NPM\")\n\nScan for NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, and BUG comments within your source, and print them to stdout so you can deal with them. This is similar to the `rake notes` task from Rails.\n\nIt ends up giving you an output like this:\n\n![](http://i.imgur.com/OXsTtCZ.png)\n\nThe color formatting is currently done using the excellent terminal coloring library [chalk](https://www.npmjs.org/package/chalk).\n\n_Fixme currently scans your matching files line-by-line looking for annotations in the code. As such; multi-line annotation capturing is currently not supported. All annotations must be on the same line._\n\n\u003c!-- TODO: Add supported filetypes section --\u003e\n\n## Supported Filetypes\n\nFixme supports scanning for annotations in a variety of file types. The default file patterns it looks for are:\n\n- **JavaScript**: `**/*.js`\n- **Makefile**: `Makefile`\n- **Shell scripts**: `**/*.sh`\n- **HTML**: `**/*.html`\n- **CSS**: `**/*.css`\n- **JSON**: `**/*.json`\n- **Markdown**: `**/*.md`\n- **Text files**: `**/*.txt`\n- **YAML**: `**/*.yaml`, `**/*.yml`\n- **SASS**: `**/*.scss`\n- **LESS**: `**/*.less`\n- **PHP**: `**/*.php`\n- **Java**: `**/*.java`\n- **Python**: `**/*.py`\n- **Ruby**: `**/*.rb`\n- **C++**: `**/*.cpp`\n- **C#**: `**/*.cs`\n- **Swift**: `**/*.swift`\n- **Rust**: `**/*.rs`\n- **Go**: `**/*.go`\n- **Header files**: `**/*.h`, `**/*.hpp`\n- **TypeScript**: `**/*.ts`\n- **JSX**: `**/*.jsx`\n- **TSX**: `**/*.tsx`\n- **Vue.js**: `**/*.vue`\n- **Perl**: `**/*.pl`\n- **Lua**: `**/*.lua`\n- **Groovy**: `**/*.groovy`\n- **Scala**: `**/*.scala`\n- **Kotlin**: `**/*.kt`\n- **Dart**: `**/*.dart`\n\n## Usage\n\nIn order to use Fixme all you need to do is install it:\n\n\u003e npm install -g fixme\n\n_Note: There really shouldn't be much reason to globally install it..._\n\nRequire it:\n\n```javascript\nvar fixme = require(\"fixme\");\n```\n\nAnd finally; configure it when you call it:\n\n```javascript\n// All values below are Fixme default values unless otherwise overridden here.\nfixme({\n  path: process.cwd(),\n  ignored_directories: [\"node_modules/**\", \".git/**\", \".hg/**\"],\n  file_patterns: [\"**/*.js\", \"Makefile\", \"**/*.sh\"],\n  file_encoding: \"utf8\",\n  line_length_limit: 1000,\n  skip: [],\n});\n```\n\nYou should then see some nice output when this is run:\n\n```\n• path/to/your/directory/file.js [4 messages]:\n  [Line   1]  ✐ NOTE: This is here because sometimes an intermittent issue appears.\n  [Line   7]  ↻ OPTIMIZE: This could be reworked to not do a O(N2) lookup.\n  [Line   9]  ✓ TODO from John: Add a check here to ensure these are always strings.\n  [Line  24]  ✄ HACK: I am doing something here that is horrible, but it works for now...\n  [Line  89]  ✗ XXX: Let's do this better next time? It's bad.\n  [Line 136]  ☠ FIXME: We sometimes get an undefined index in this array.\n  [Line 211]  ☢ BUG: If the user inputs \"Easter\" we always output \"Egg\", even if they wanted a \"Bunny\".\n```\n\n### Configure Options (In More Detail)\n\n- **path:** The path to scan through for notes, defaults to process.cwd()\n- **ignored_directories:** Glob patterns for directories to ignore. Passes these straight to [minimatch](https://www.npmjs.org/package/minimatch) so check there for more information on proper syntax.\n- **file_patterns:** Glob patterns for files to scan. Also uses [minimatch](https://www.npmjs.org/package/minimatch).\n- **file_encoding:** The encoding the files scanned will be opened as.\n- **line_length_limit:** The number of max characters a line can be before Fixme gives up and doen not scan it for matches. If a line is too long, the regular expression will take an extremely long time to finish. _You have been warned!_\n- **skip:** List of check names to skip. Valid options: `note`, `optimize`, `todo`, `hack`, `xxx`, `fixme`, `bug`, `line`. `line` will disable the line length warning.\n\n### CLI Usage\n\n```sh\nfixme --help\n```\n\n### Using With [GulpJS](http://gulpjs.com/)\n\nUsing this as a GulpJS task is pretty simple, here is a very straight-forward \"notes\" task:\n\n```javascript\ngulp.task(\"notes\", fixme);\n```\n\nThat, of course, assumes all of the defaults in Fixme are ok with you. If not, this is still pretty simple to configure and run as a Gulp task:\n\n```javascript\ngulp.task(\"notes\", function () {\n  fixme({\n    path: process.cwd(),\n    ignored_directories: [\"node_modules/**\", \".git/**\", \".hg/**\"],\n    file_patterns: [\"**/*.js\", \"Makefile\", \"**/*.sh\"],\n    file_encoding: \"utf8\",\n    line_length_limit: 1000,\n  });\n});\n```\n\n### Writing Comments for Use With Fixme\n\nA code annotation needs to follow these rules to be picked up by Fixme:\n\n- Can be preceeded by 0 to n number of characters, this includes the comment characters //, /\\*, \u003c!--, {{!, or {#\n- Must not have colon (:) before the comment character //\n- Must have one of the words: NOTE, OPTIMIZE, TODO, HACK, XXX, FIXME, or BUG\n- Can have an @ character before any of the above characters\n- Can have 0 to n space characters\n- Can have an author in parenthesis after the above word, and before a colon (:)\n- Can have 0 to n space characters\n- Must be followed by a colon (:)\n- Can have 0 to n space characters\n- Should have a message of 0 to n characters for the note\n\n#### Displaying Authors\n\nYou can have an author of a comment displayed via Fixme:\n\n```javascript\n// NOTE(John Postlethwait): This comment will be shown as a note, and have an author!\n```\n\n```shell\n  [Line 1]  ✐ NOTE from John Postlethwait: This comment will be shown as a note, and have an author!\n```\n\n#### More Examples\n\nTake a look at the `test/annotation_test.js` file, all of those comments in there are supported and expected to parse with Fixme.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohnPostlethwait%2Ffixme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJohnPostlethwait%2Ffixme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJohnPostlethwait%2Ffixme/lists"}