I saw this software implementing wikipedia's List of common misspellings and wondered what would happen if I ran it against drupal core.

Files: 
CommentFileSizeAuthor
#16 1054848-run-codespell.py-on-drupal-7-branch.patch156.6 KBbarraponto
PASSED: [[SimpleTest]]: [MySQL] 36,058 pass(es).
[ View ]
#9 1054848-drupal-codespell-9.patch157.22 KBbarraponto
PASSED: [[SimpleTest]]: [MySQL] 32,879 pass(es).
[ View ]
#5 1054848-drupal-codespell-5.patch154.65 KBbarraponto
PASSED: [[SimpleTest]]: [MySQL] 33,645 pass(es).
[ View ]
#5 review.txt4.18 KBbarraponto
drupal-typing-errors.patch164.36 KBbarraponto
PASSED: [[SimpleTest]]: [MySQL] 31,572 pass(es).
[ View ]

Comments

Status:Active» Needs review

The patch itself needs review, while I'll take it as a task reviewing the typo-related issues and seeing if this patch makes sense.
btw, the patch is big (160kb) because there was a typo in the 60k of aaaaaaa lines (in comments, of course).

Version:7.x-dev» 8.x-dev

Sounds useful

Good to see quite a few core spelling mistakes caught by this script... Rather than creating one massive core patch that is overwhelming to review, perhaps this patch file could be broken up into chunks of say 25 spelling mistakes? It would be easier to review and get committed I suspect.

Ideally this functionality in time could be added to the coder module. Great find!!

Status:Needs review» Needs work

<?php
-          // We can prune the database file if it doens't have any tables.
+          // We can prune the database file if it does't have any tables.
?>

(... and others like this one)

This only affect comments and some UI strings, so it should be safe otherwise.

StatusFileSize
new4.18 KB
new154.65 KB
PASSED: [[SimpleTest]]: [MySQL] 33,645 pass(es).
[ View ]

Fixed the error Damien Tournoud pointed out, ran a newer version of codespell.py against latest drupal.
I'm attaching a review file to make it easier to see what has been fixed.

All of those spelling changes in review.txt look good, including the doens't highlighted by Damien Tournoud. I did not check each in turn in the patch file, but presume that changes are like before.

Status:Needs work» Reviewed & tested by the community

Looks all good. Thanks for the patch!

Status:Reviewed & tested by the community» Needs work

does not apply anymore

Status:Needs work» Needs review
StatusFileSize
new157.22 KB
PASSED: [[SimpleTest]]: [MySQL] 32,879 pass(es).
[ View ]

Once again.

Status:Needs review» Needs work

The last submitted patch, 1054848-drupal-codespell-9.patch, failed testing.

I reviewed 1054848-drupal-codespell-9.patch looks good.
Why not getting rid of that aaaaaaaaaa.... comment, too?

The comment is: "A large comment block to test for segfaults and speed. This is 60K a's. Extreme but useful to demonstrate flaws in comment striping regexp. aaaa..."

Located at line 7 of ./modules/simpletest/files/css_test_files/comment_hacks.css.unoptimized.css

We really need that?

Status:Needs work» Needs review

#9: 1054848-drupal-codespell-9.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Anyone running screaming due to the size of the patch: 120K is from the 60k A used for the css tests *twice* because it's context for a line of change. Joys of patch.

Status:Reviewed & tested by the community» Fixed

Reviewed all the changes and committed the patch to 8.x.

The patch doesn't apply to 7.x so I couldn't backport it. Probably easiest to run codespell.py on 7.x.

Thanks!

Version:8.x-dev» 7.x-dev
Status:Fixed» Patch (to be ported)
StatusFileSize
new156.6 KB
PASSED: [[SimpleTest]]: [MySQL] 36,058 pass(es).
[ View ]

Ran codespell.py on the 7.x branch.

Status:Patch (to be ported)» Needs review

Status:Needs review» Reviewed & tested by the community

Status:Reviewed & tested by the community» Fixed

Ok, since the RTBC queue is looking pretty good around now, seems like it makes sense to commit this now. SO...

Committed and pushed to 7.x. Thanks! Yay, better spelling. ;)

Status:Fixed» Closed (fixed)
Issue tags:-typo

Automatically closed -- issue fixed for 2 weeks with no activity.