{"id":17918053,"url":"https://github.com/bogdanp/racket-review","last_synced_at":"2025-04-03T08:29:18.140Z","repository":{"id":54397479,"uuid":"191135877","full_name":"Bogdanp/racket-review","owner":"Bogdanp","description":"A linter for Racket.","archived":false,"fork":false,"pushed_at":"2025-02-26T13:24:44.000Z","size":955,"stargazers_count":45,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T14:30:49.182Z","etag":null,"topics":["linter","racket"],"latest_commit_sha":null,"homepage":"","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bogdanp.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":"2019-06-10T09:17:45.000Z","updated_at":"2025-02-26T13:24:47.000Z","dependencies_parsed_at":"2023-11-15T07:28:56.535Z","dependency_job_id":"2e9979da-3b7d-41a0-a839-73db68f5a75e","html_url":"https://github.com/Bogdanp/racket-review","commit_stats":{"total_commits":112,"total_committers":4,"mean_commits":28.0,"dds":"0.044642857142857095","last_synced_commit":"ff455cb9cc2c9e880f56ed19255e44bbcbf0c923"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bogdanp%2Fracket-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bogdanp%2Fracket-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bogdanp%2Fracket-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bogdanp%2Fracket-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bogdanp","download_url":"https://codeload.github.com/Bogdanp/racket-review/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246964802,"owners_count":20861747,"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":["linter","racket"],"created_at":"2024-10-28T20:09:35.945Z","updated_at":"2025-04-03T08:29:18.116Z","avatar_url":"https://github.com/Bogdanp.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"# racket-review\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://github.com/Bogdanp/racket-review/actions?query=workflow%3A%22CI%22\"\u003e\u003cimg alt=\"GitHub Actions status\" src=\"https://github.com/Bogdanp/racket-review/workflows/CI/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![a screenshot of racket-review being used inside Emacs](media/screenshot.png)\n\n`racket-review` performs surface-level linting of individual Racket\nmodules with the intent of finding issues as quickly as it can. It\ndoes not expand the programs it lints, so there may be cases where\nit is wrong, but, in practice, it performs reasonably well on `#lang\nracket{,/base}` programs.\n\nIt currently reports the following issues:\n\n* `[error]` \"identifier * provided but not defined\"\n* `[error]` \"identifier is already defined\"\n* `[error]` \"if expressions must contain one expression for the then-branch and another for the else-branch\"\n* `[error]` \"let forms must contain at least one body expression\"\n* `[error]` \"syntax error\"\n* `[error]` \"use _ instead of else in the fallthrough case of a match expression\"\n* `[error]` \"case clause must be in the form (\u003cconst\u003e ...), not '\u003cconst\u003e\"\n* `[error]` \"use '() for match pattern instead of null or empty\"\n* `[warning]` \"bindings within a let should be surrounded by square brackets\"\n* `[warning]` \"identifier * is already defined\"\n* `[warning]` \"identifier * is never used\"\n* `[warning]` \"identifier * shadows an earlier binding\"\n* `[warning]` \"missing module (#lang) declaration\"\n* `[warning]` \"require (for-syntax ...) should come before all others\"\n* `[warning]` \"require * should come after *\"\n* `[warning]` \"require * should come before *\"\n* `[warning]` \"this cond expression does not have an else clause\"\n* `[warning]` \"use a cond expression instead of nesting begin or let inside an if\"\n\n## Setup\n\n    $ raco pkg install review\n\n## Usage\n\n    $ raco review filename.rkt\n\nTo tell the linter to ignore an entire module, add a comment like\n\n``` racket\n#|review: ignore|#\n```\n\nto the source file. To tell it to ignore a particular line, end that\nline with one of the following comments:\n\n``` racket\n;; noqa\n;; lint: ignore\n;; review: ignore\n```\n\n## Adding Custom Rules\n\n**Note: this protocol is currently experimental and subject to change.\nIf you use it in your own packages, please let me know.**\n\nA package may declare its own linting rules by providing a `review-exts`\ndefinition in its top-level `info.rkt` file. Each `review-exts`\ndefinition is a list of triples, where the first value is an absolute\nmodule path, the second is the name of a predicate procedure provided by\nthat module, and the third is the name of a linting procedure provided\nby that module.\n\nBoth the predicate and the linting procedure must take a single syntax\nobject as argument. The linting procedure is called on a piece of syntax\nwhenever the predicate procedure returns `#t`.\n\nFor an example, see [this package][ext example].\n\n## Emacs/flycheck support\n\nAdd the following snippet to your `init.el` to define a Flycheck\nchecker for `racket-review`:\n\n``` emacs-lisp\n(flycheck-define-checker racket-review\n  \"check racket source code using racket-review\"\n  :command (\"raco\" \"review\" source)\n  :error-patterns\n  ((error line-start (file-name) \":\" line \":\" column \":error:\" (message) line-end)\n   (warning line-start (file-name) \":\" line \":\" column \":warning:\" (message) line-end))\n  :modes racket-mode)\n\n(add-to-list 'flycheck-checkers 'racket-review)\n```\n\nOr install the Emacs plugin from the `elisp` directory:\n\n```shell\n(cd elisp \u0026\u0026 make install)\n```\n\n## Prior work\n\n* http://planet.racket-lang.org/package-source/clements/no-brainer.plt/1/5/\n* http://tmp.barzilay.org/code-ayatollah.rkt\n* https://github.com/jackfirth/syntax-warn\n\n## License\n\n    racket-review is licensed under the 3-Clause BSD license.\n\n[ext example]: https://github.com/Bogdanp/Noise/tree/70dd4146e1f20561ef93433032ef9f26d886c23a/Racket/noise-serde-lint-lib\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdanp%2Fracket-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbogdanp%2Fracket-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbogdanp%2Fracket-review/lists"}