-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2023-04-17, Service Arch 2023-05-01, Service Arch 2023-05-15
We've accumulated a large number of text files over time for which the last line is unterminated. This is something we lint against, and it's a source of churn. We can make a single commit to bulk-fix everything in the repo. Of course, files that are recognized as "binary" by git should be left alone. The appropriate repair can be generated by:
#!/bin/bash find_missing_eol_filter() { while read f ; do tail -n 1 "$f" | read _ || echo "$f" ; done } fix_missing_eol_filter() { while read f ; do echo >> "$f" ; done } generate_text_files_list() { git ls-files --eol | grep -v src/third_party | grep '^i/lf' | cut -c 40- } generate_text_files_list | find_missing_eol_filter | fix_missing_eol_filter
https://gist.github.com/BillyDonahue/976c19b4de7c06a49f57a81ae7642bd4
- depends on
-
SERVER-76620 query_golden_* jstests should ensure test output is EOL-terminated
- Closed