This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/*] Fix common typos.


On Sun, 21 Jul 2013, Ondřej Bílka wrote:

This is series of typo fixing patches. They are generated with stylepp
https://github.com/neleai/stylepp
which makes patch generation very effective.

This series should be applied in sequence to avoid reviewing duplicates.

Now I exclude those directories that are upstream, see file
https://github.com/neleai/stylepp/blob/master/maintained/gcc/ignore
and if you want ignore additional files/directories add them to this
file.

Now for patch itself, situation is following:
I extracted 4214 common corrections from wikipedia, in following list:
https://github.com/neleai/stylepp/blob/master/maintained/dictionary_wiki
I plan to add another replacements that we will frequently encounter.

There is possibility to generate this list automatically from commit
history, If we look when in comment commit changes word but not two
adjacent words and aspell list says that changed word went from wrong to
correct it is  likely a typo fix. We could extract these
replacement pairs and use them. I would gladly welcome somebody to
volunteer to write this analysis.

Then I ran script/stylepp_fix_spell which produced following 300kb patch:

http://kam.mff.cuni.cz/~ondra/0001-Fix-common-typos.patch

There are still some wrong fixes, humans really need to check each of them (for instance throught -> thought instead of through). I think I saw a few overlong lines (more than 80 chars on a line, counting a tab as 8) after replacement. I don't know if capitalizing all instances of "ok" is really worth it...

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]