{"id":20082125,"url":"https://github.com/exercism/javascript-analyzer","last_synced_at":"2025-10-04T03:49:09.874Z","repository":{"id":40322044,"uuid":"176361577","full_name":"exercism/javascript-analyzer","owner":"exercism","description":"This is Exercism's automated analyzer for the JavaScript track.","archived":false,"fork":false,"pushed_at":"2025-03-13T08:52:21.000Z","size":2429,"stargazers_count":16,"open_issues_count":14,"forks_count":18,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-29T07:22:23.826Z","etag":null,"topics":["community-contributions-paused","exercism-analyzer","exercism-tooling","maintained"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-18T20:09:56.000Z","updated_at":"2025-03-13T08:52:26.000Z","dependencies_parsed_at":"2023-01-25T21:01:37.060Z","dependency_job_id":"9f0ac756-57ba-4f8d-a30e-5284d80ea209","html_url":"https://github.com/exercism/javascript-analyzer","commit_stats":{"total_commits":163,"total_committers":13,"mean_commits":"12.538461538461538","dds":"0.34355828220858897","last_synced_commit":"0057bcae23bbcd6be9eb89eeeb62e58429a320fe"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fjavascript-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fjavascript-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fjavascript-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fjavascript-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/javascript-analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216004,"owners_count":21713079,"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":["community-contributions-paused","exercism-analyzer","exercism-tooling","maintained"],"created_at":"2024-11-13T15:42:02.882Z","updated_at":"2025-10-04T03:49:09.861Z","avatar_url":"https://github.com/exercism.png","language":"TypeScript","readme":"# @exercism/javascript-analyzer\n\n[![javascript-analyzer / main](https://github.com/exercism/javascript-analyzer/actions/workflows/ci.js.yml/badge.svg)](https://github.com/exercism/javascript-analyzer/actions/workflows/ci.js.yml)\n[![Deploy](https://github.com/exercism/javascript-analyzer/actions/workflows/deploy.yml/badge.svg)](https://github.com/exercism/javascript-analyzer/actions/workflows/deploy.yml)\n\nRuns static analysis using [`@exercism/static-analysis`][git-static-analysis] on exercises from the [`@exercism/javascript` track][git-javascript].\n\n## Installation\n\nClone this repository and then run:\n\n```bash\nyarn install\n```\n\nYou'll need at least Node LTS for this to work.\n\n```bash\nyarn build\n```\n\n## Usage\n\nYou can run this either via `yarn`:\n\n```bash\nyarn analyze:bat --debug --console two-fer ~/path/to/solution/folder\n```\n\nOr directly via the provided shell script:\n\n```bash\n./bin/analyze.sh --debug --console two-fer ~/path/to/solution/folder\n```\n\nAdd the `--debug` and `--console` flags to get output in the terminal window.\n\n### Using docker\n\nTo create the image, execute the following command from the repository root:\n\n```bash\ndocker build -t exercism/javascript-analyzer .\n```\n\nTo `run` from docker pass in the solutions path as a volume and execute with the necessary parameters:\n\n```bash\ndocker run -v $(PATH_TO_SOLUTION):/solution exercism/javascript-analyzer ${SLUG} /solution\n```\n\nExample:\n\n```bash\ndocker run -v ~/solution-238382y7sds7fsadfasj23j:/solution exercism/javascript-analyzer two-fer /solution\n```\n\n## Tools\n\nWe use various tools to maintain this repository and this analyzer.\nIn order to contribute to the _code_ of this track, you'll need NodeJS (LTS or higher) installed, with some of the [`bin/*`][file-bin] files having extra dependencies, as listed in their file-level commentary.\n\n### `analyze` (.sh, .bat)\n\n```shell\n./bin/analyze.sh two-fer ~/folder/to/solution -dcp\n```\n\nThis runs the analyzer using `two-fer` as exercise and a path to a solution.\nMost scripts, including this one, accept a wide range of flags to change or enhance the behaviour, as coded in [`execution_options.ts`][file-execution-options].\n\nRun with the `-h` / `--help` flag to get a list of flags and their description.\n\n```shell\n./bin/analyze.sh --help\n```\n\nYou'll most likely want `-dcp` (`--debug`,`--console` and `--pretty`) during development, which enables console output (instead of `stdout`/`stderr`) and shows `logger.log` as well as `logger.error` and `logger.fatal`.\nIt will also format the output JSON with 2 space indentation, both in the output file and the console.\n\nIf you wish to _preview_ the actual messages, pass in `--noTemplates` to use the analyzer `Comment`Factories to generate actual messages.\nIf the comment factories are kept in-sync with `website-copy`, it will be the exact same output as on the site.\n\n### `batch` (.sh, .bat)\n\n```shell\n./bin/batch.sh two-fer -cp\n```\n\nRuns all the fixtures in `~/test/fixtures/two-fer` through the analyzer, giving a summary at the end with all results.\nThis places an `analysis.json` in the source fixture folder.\n\nYou'll most likely want `-cp` (`--console` and `--pretty`) during development, which enables console output (instead of `stdout`/`stderr`) and formats the\noutput JSON with 2 space indentation.\n\nIf you wish to _preview_ the actual messages, pass in `--noTemplates` to use the analyzer `Comment`Factories to generate actual messages.\nIf the comment factories are kept in-sync with `website-copy`, it will be the exact same output as on the site.\n\n### `remote` (.sh, .bat)\n\n```shell\n./bin/remote.sh https://exercism.io/tracks/javascript/exercises/two-fer/solutions/df3bb5d7131c44ea9c62206cc8d6c225 -dcp --dry\n```\n\nYou need the [`exercism` cli][cli] in order for this to work. It takes an _exercism solution url_ and downloads it using the `exercism` cli.\nIt then runs the analyzer on it.\n\nYou'll most likely want `-dcp --dry` (`--debug`, `--pretty`, `--console` and `dry run`) during development, which enables console output (instead of\n`stdout`/`stderr`), shows `logger.log` as well as `logger.error` and `logger.fatal`, pretty prints the JSON output and disables writing the output\nto `analysis.json`.\n\nYou can pass the following type of URLs:\n\n- Published solutions: `/tracks/javascript/exercises/\u003cslug\u003e/\u003cid\u003e`\n- Mentor solutions: `/mentor/solutions/\u003cid\u003e`\n- Your solutions: `/my/solutions/\u003cid\u003e`\n- Private solutions: `/solutions/\u003cid\u003e`\n\nIf you wish to _preview_ the actual messages, pass in `--noTemplates` to use the analyzer `Comment`Factories to generate actual messages.\nIf the comment factories are kept in-sync with `website-copy`, it will be the exact same output as on the site.\n\n[cli]: https://github.com/exercism/cli\n[git-static-analysis]: https://github.com/exercism/javascript-lib-static-analysis\n[git-javascript]: https://github.com/exercism/javascript\n[file-bin]: https://github.com/exercism/javascript-analyzer/bin\n[file-execution-options]: https://github.com/exercism/javascript-analyzer/src/utils/execution_options.ts\n","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fjavascript-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Fjavascript-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fjavascript-analyzer/lists"}