{"id":46893,"date":"2025-02-27T15:11:03","date_gmt":"2025-02-27T20:11:03","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=46893"},"modified":"2025-02-27T15:11:03","modified_gmt":"2025-02-27T20:11:03","slug":"xcode-spell-checking","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2025\/02\/27\/xcode-spell-checking\/","title":{"rendered":"Xcode Spell Checking"},"content":{"rendered":"<p><a href=\"https:\/\/www.jessesquires.com\/blog\/2025\/02\/24\/xcode-tip-spell-check\/\">Jesse Squires<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.jessesquires.com\/blog\/2025\/02\/24\/xcode-tip-spell-check\/\"><p>Did you know that Xcode can spell check your code and comments? Based on my experience working on large teams and large Xcode projects, this is a little-known feature. I routinely find spelling errors, not only in code comments but in symbol names. For the latter, this is particularly frustrating when a misspelled symbol is widely used because correcting that error &mdash; a rename that affects a substantial portion of the codebase &mdash; produces a large diff.<\/p><p>[&#8230;]<\/p><p>In Xcode, you can enable spelling from the Edit menu, <em>Edit &gt; Format &gt; Spelling and Grammar &gt; Check Spelling While Typing<\/em>. Just like a typical word processor, Xcode will helpfully underline misspelled words and offer to apply corrections.<\/p><p>Even better, Xcode understands variable names and will correctly identify errors in <em>camelCase<\/em>, <em>snake_case<\/em>, and other common identifier formats.<\/p><\/blockquote>\n\n<p>A good reminder. I think I used to have this enabled, and then it got turned off, and then I forgot Xcode could check spelling because the option isn&rsquo;t in the contextual menu like in most apps.<\/p>\n\n<p>It seems to ignore single-letter prefixes and some multi-letter ones like <code>rw<\/code>, but it doesn&rsquo;t like <code>ns<\/code> or most Hungarian notation.<\/p>","protected":false},"excerpt":{"rendered":"<p>Jesse Squires: Did you know that Xcode can spell check your code and comments? Based on my experience working on large teams and large Xcode projects, this is a little-known feature. I routinely find spelling errors, not only in code comments but in symbol names. For the latter, this is particularly frustrating when a misspelled [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2025-02-27T20:11:06Z","apple_news_api_id":"bb3d8f37-5f69-4cb5-baf0-f5b536be669c","apple_news_api_modified_at":"2025-02-27T20:11:06Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/Auz2PN19pTLW68PW1Nr5mnA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[30,2598,71,2732,226],"class_list":["post-46893","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-mac","tag-macos-15-sequoia","tag-programming","tag-spelling","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=46893"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46893\/revisions"}],"predecessor-version":[{"id":46894,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46893\/revisions\/46894"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=46893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=46893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=46893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}