iafan / goplayspace

Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
https://goplay.space
Other
981 stars 63 forks source link

Consider adding linters #12

Open AlekSi opened 6 years ago

AlekSi commented 6 years ago

Specifically, I would like to see go vet.

iafan commented 6 years ago

Thanks for the suggestion, Alexey. Unfortunately, go vet is a command, not a package one can use directly from external code, so it makes it currently impossible to plug into Go Play Space (GPS), since GPS runs formatting/validation in the browser, without any backend code. The actual code execution is proxied to the official Go Playground, so if Go Playground adds an ability for linting, I'll happily support it. Note that some linters also require the file to be saved to disk in the proper directory relative to GOPATH, which might be also a potential obstacle in implementing linting for playground scripts.