LPS-39993 Add check to SourceFormatter