Follow-up from "Fix lint issues in internal/lsif_transformer/parser/(parser|ranges|referen|result)"
The following discussion from !151153 (merged) should be addressed:
suggestion: Hmm, maybe not. We need a comment if we don't return the error.. perhaps even something like:
errPrCloseErr := p.pr.Close() errDocsCloseErr := p.Docs.Close() if errPrCloseErr != nil { if errDocsCloseErr != nil { return fmt.Errorf("errPrCloseErr: %v, errDocsCloseErr: %v", errPrCloseErr, errDocsCloseErr) } return errPrCloseErr } return errDocsCloseErr
suggestion: We should return the the
error
from.Close()
here, which will mean we'll need to change the method to also returnerror
and handle higher up too:return pw.Close()
suggestion: Related to !151153 (diffs, comment 1919749120):
func (p *Parser) transform(pw *io.PipeWriter) error {
suggestion: Related to !151153 (diffs, comment 1919749120):
return err
suggestion: Related to !151153 (diffs, comment 1919749120):
return err
suggestion: Hmm, transform()
is called as a goroutine which means the returned error message needs to be handled now. Even though we throw it away here, I feel this is the best place to do this and have all other methods return error
instead of throwing away there.
go func() { _ = parser.transform(pw) }()
cc @vyaklushin