LPS-51315 Add check to SourceFormatter