LPS-45885 Add check to SourceFormatter