Skip to content

Fix issue with detecting comments in PHP

Andras Herczeg requested to merge remove-completion-logging into main

What does this merge request do and why?

This MR fixes 3 problems introduced in !448 (merged)

  1. It returns None instead of BaseCommentVisitor if there is no visitor for the provided language. This results in all the PHP suggestion being thrown out.
  2. It removes a line where we log the completion returned by the model. This goes against our data usage policy.
  3. Empty strings were considered as "comments only" and were logged as such

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Andras Herczeg

Merge request reports