Skip to content

Commit

Permalink
Remove illegal characters from suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
drawers committed May 20, 2024
1 parent f96760d commit 5b7db89
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ class TestFunctionNameDetector : Detector(), SourceCodeScanner {
return null
}

return LintFix.create().name("Use name suggested by language model").replace().all().with(proposedFunctionName).autoFix().build()
// Remove illegal characters
val sanitizedFunctionName = proposedFunctionName.replace('.', '·').replace(':', '·')

return LintFix.create().name("Use name suggested by language model").replace().all().with(sanitizedFunctionName).autoFix().build()
}

companion object {
Expand Down

0 comments on commit 5b7db89

Please sign in to comment.