Last 12 weeks · 0 commits
2 of 6 standards met
Description Consider the following example, adapted from the README: We can see that is generic over . Late night me (i.e. not trustworthy) thinks this should lint successfully, but rejects it. I suppose that a reasonable criticism might be "how would know that is the correct concrete type for e.g. the following is valid go but we would not want it to lint: Any thoughts? Cheers!
Fixes https://github.com/BurntSushi/go-sumtype/issues/4 Convert the go-sumtype linting logic to use the package and export an from the new package. This required a bit more of an invasive change than initially thought. The main changes were: move from package for loading the files to the new package report issues directly to the parameter, rather than collecting a list of errors use rather than a custom method: the expects a An effort was taken to do this change with the minimum amount of logic changes as possible, to reduce the chance of regression. There is, however, a minor regression: due to manually searching the go files for the comment directive, we do not have an accurate . We instead use the of the whole file which will report at the top of the file. It may be possible to craft a custom here, but I do not currently know how to do this.
Repository: BurntSushi/go-sumtype. Description: A simple utility for running exhaustiveness checks on Go "sum types." Stars: 455, Forks: 24. Primary language: Go. Languages: Go (100%). License: Unlicense. Open PRs: 2, open issues: 8. Last activity: 1y ago. Community health: 42%. Top contributors: BurntSushi, kujenga, xuxinx, frou, jmquigs.