[Post-Processing] Don't return pointless suggestions
Problem
Sometimes pointless suggestions get shown to the user, example: https://gitlab.enterprise.slack.com/files/U01CBGX2WER/F05H18XERDX/code_suggestions_not_showing_up.mp4
This was also observed in recent user interviews
By pointless recommendations, we can consider the following examples:
-
empty strings -
whitespaces, tabs, and newlines only -
empty comments -
unparsable content
Desired Outcome
We filter out "pointless" suggestions as much as possible and instead return an empty suggestion that extensions than need to handle.
Proposed Solution
We need to update the post-processing layer to eliminate suggesting pointless code completions.
Related
Work already done in the Visual Studio ext - gitlab-org/editor-extensions/gitlab-visual-studio-extension!33 (merged)
Related issues - #190 (closed)
Edited by Tan Le