Exalysis is a tool designed to help mentors of the Exercism Go track. It will automatically run the tests on a student's solution, check gofmt and golint, and make some helpful suggestions for the student based on static analysis of the code for common errors and patterns (see sample Exalysis output).
It's not perfect: you should check Exalysis's suggestions before sending them to the student, and add your own notes if necessary, but it can dramatically speed up the process of mentoring by automating these repetitive tasks.
This is a proof of concept. I use it to mentor, and enhance/extend it as I go.
Exercise implementations: - Two Fer - Hamming - Raindrops - Scrabble Score - Isogram - Difference of Squares - Luhn - Parallel Letter Frequency
Exalysis will do its format, lint, and test checks on any solution, but specific suggestions have so far been implemented for only the exercises above. If you'd like to add support for a new exercise, please submit a PR! (See 'Contributions' below.)
GO111MODULE=on go get github.com/exercism/exalysis
GO111MODULE=on go install github.com/exercism/exalysis/cmd/exalysis
To start Exalysis in watch mode, run this command:
exalysis -watch
When you copy an Exercism download command to the clipboard, Exalysis will detect this and do the following:
The output of Exalysis is automatically copied to the clipboard, so all you need to do is paste into the comment box on the Exercism site and review your answer.
With no arguments, the exalysis command will analyse the solution in the current directory and write its suggestions to the standard output.
exalysis
Exalysis runs the following tools on each solution:
golintgofmtgo testgo test -race (for exercises involving concurrency)go vetgolangci-lintgo test -bench (when run with the -bench flag)-watch mode.Warning! The tool is not to be used without examining the code and trying to figure out how to best help the student. The output should not be used without checking it! There might be false positives or missing suggestions or simply too much information for the student to handle at once.
Any contribution is welcome as long as it complies with the code of conduct of Exercism and the mentoring guidelines.
You can open an issue if you find a false positive that you think will happen more than once and should be fixed. The same with suggestions you think are missing.
One very simple way to contribute is to add samples for a case that is not covered yet, add the comment that should be shown to the student and add a test for it. That could be done for an already supported exercise or one that is not supported yet. The existing test structure is a good sample.
There are still many exercises to be implemented. If you're up for implementing a new exercise, that would be much appreciated.
There's a channel on the Exercism Team Slack for discussion, development, and questions about Exalysis: #track-go-exalysis.
If you're not already on this Slack, email mentoring@exercism.io to request an invite.
$ claude mcp add exalysis \
-- python -m otcore.mcp_server <graph>