<commit_before>#!/bin/sh
files=`find . -name \*.cxx -o -name \*.h -o -name \*.cpp -o -name Makefile.am -o -name README\* -o -name \*.dsp -o -name \*.fmt | sort`
for file in $files ; do
 sed -i -e 's/[[:space:]]*$//' -e 's/ \t/\t/' $file
done
grep -Irsl '[[:space:]][[:space:]]*$' . | grep -v Makefile$<commit_msg>might as well convert 8 spaces to tab too<commit_after>#!/bin/sh
files=`find . -name \*.cxx -o -name \*.h -o -name \*.cpp -o -name \*.c -o -name Makefile.am | sort`
# convert 8 spaces to tab
for file in $files ; do
 sed -i -e 's/[ ][ ][ ][ ][ ][ ][ ][ ]$/\t/' $file
done
files=`find . -name \*.cxx -o -name \*.h -o -name \*.cpp -o -name \*.c -o -name Makefile.am -o -name README\* -o -name \*.dsp -o -name \*.fmt | sort`
# remove trailing whitespace and convert spacetab to tab
for file in $files ; do
 sed -i -e 's/[[:space:]]*$//' -e 's/ \t/\t/' $file
done
echo files with trailing whitespace:
grep -Irsl '[[:space:]][[:space:]]*$' . | grep -v Makefile$
{'fraction_non_alphanumeric': 0.2510330578512397, 'fraction_numerical': 0.002066115702479339, 'mean_word_length': 2.460714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '555599', 'n_tokens_mistral': 417, 'n_tokens_neox': 403, 'n_words': 142}