# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>. */
+import difflib
import os
import re
changed_files = set(cand)
for file in sorted(mentioned_files - changed_files):
msg = 'unchanged file mentioned in a ChangeLog'
+ candidates = difflib.get_close_matches(file, changed_files, 1)
+ if candidates:
+ msg += f' (did you mean "{candidates[0]}"?)'
self.errors.append(Error(msg, file))
for file in sorted(changed_files - mentioned_files):
if not self.in_ignored_location(file):
email = self.from_patch_glob('0096')
assert email.errors
err = email.errors[0]
- assert err.message == 'unchanged file mentioned in a ChangeLog'
+ assert err.message == 'unchanged file mentioned in a ChangeLog (did ' \
+ 'you mean "gcc/testsuite/gcc.target/aarch64/' \
+ 'advsimd-intrinsics/vdot-3-1.c"?)'
assert err.line == 'gcc/testsuite/gcc.target/aarch64/' \
'advsimd-intrinsics/vdot-compile-3-1.c'