https://github.com/exercism/go-representer
https://github.com/exercism/go-representer
community-contributions-paused exercism-representer exercism-tooling maintained-autonomous
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/exercism/go-representer
- Owner: exercism
- License: agpl-3.0
- Created: 2019-11-28T08:16:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T07:06:33.000Z (9 months ago)
- Last Synced: 2025-04-29T05:28:32.378Z (about 1 month ago)
- Topics: community-contributions-paused, exercism-representer, exercism-tooling, maintained-autonomous
- Language: Go
- Size: 79.1 KB
- Stars: 2
- Watchers: 13
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Exercism's Go Representer
This is Exercism's representer for the Go track. See the
[docs](https://exercism.org/docs/building/tooling/representers) for more
information on representers.## Build Executable
This will create an executable called `represent`.```
go build -tags build -o represent .
```## Executing the Representer
The representer takes three arguments:* The slug of the exercise (e.g. `two-fer`).
* A path to a directory containing the submitted file(s) (with a trailing slash).
* A path to an output directory (with a trailing slash). This directory is writable.The representer will write a `representation.txt` and `mapping.json`
file to the output directory.With the binary built above:
```
represent two-fer ./representer/testdata/two-fer/1/ ./
```## Current Normalizations
The basic normalizations recommended in the [docs](https://exercism.org/docs/building/tooling/representers/normalization) are implemented.
* Use placeholders for variable names
* Remove comments
* Apply standard formatting
* Consolidate multiple files
* Sort top level declarations (imports, types, constants, variables, functions)## Batch Analysis
See [Batch Analysis README](https://github.com/exercism/go-representer/blob/main/script/README.md) for information on how to run the representer on a bigger data set.