In my last pull request (#203), I happened to notice that there were a good number of errors in the Lint step of the CI pipeline. This observation made me wonder why all these errors existed while the pipeline still passed. What I learned is that the golint command is missing the -set_exit_status flag that would truly enforce linting rules.
Solution
One solution to the issue is to add the -set_exit_status flag in the pipeline and fix any outstanding linting issues. However, it should also be noted that golint was deprecated on May 9, 2021 and staticcheck is called out as a replacement. Therefore, the better long term solution might be to replace golint with staticcheck.
Consider this pull request as a proposal. If you'd rather stick with golint and address the errors it reports then let me know and I can take a look at that instead.
Issue
In my last pull request (#203), I happened to notice that there were a good number of errors in the Lint step of the CI pipeline. This observation made me wonder why all these errors existed while the pipeline still passed. What I learned is that the golint command is missing the -set_exit_status flag that would truly enforce linting rules.
Solution
One solution to the issue is to add the
-set_exit_status
flag in the pipeline and fix any outstanding linting issues. However, it should also be noted that golint was deprecated on May 9, 2021 andstaticcheck
is called out as a replacement. Therefore, the better long term solution might be to replacegolint
withstaticcheck
.Consider this pull request as a proposal. If you'd rather stick with
golint
and address the errors it reports then let me know and I can take a look at that instead.