TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Open source style checker for Objective C

35 pointsby rwalkeralmost 12 years ago

8 comments

rwalkeralmost 12 years ago
I&#x27;m a big believer in automating process where possible - instead of trying to remember style rules or dealing with inconsistent code across a codebase, just write a script to deal with it!<p>This one was particularly fun to write because it was an excuse to use the awesome parcon library (<a href="http://www.opengroove.org/parcon/parcon-tutorial.html" rel="nofollow">http:&#x2F;&#x2F;www.opengroove.org&#x2F;parcon&#x2F;parcon-tutorial.html</a>)
评论 #5965192 未加载
zbowlingalmost 12 years ago
Been doing something like this but instead of a custom parser, I&#x27;ve been building it against clang&#x27;s own AST instead of reinventing the wheel.
评论 #5965321 未加载
Zevalmost 12 years ago
Neat. Playing with parsers is fun!<p>FWIW, a similar tool exists that works with most C-style languages, `uncrustify`. Might be worth looking into as well?<p><a href="http://uncrustify.sourceforge.net" rel="nofollow">http:&#x2F;&#x2F;uncrustify.sourceforge.net</a>
评论 #5964246 未加载
revetknalmost 12 years ago
This reminds me that it&#x27;s 2013 and Xcode still doesn&#x27;t have a built-in code formatter :(
评论 #5964645 未加载
bla2almost 12 years ago
Or use a tool that fixes your style instead of just listing errors: <a href="http://clang.llvm.org/docs/ClangFormat.html" rel="nofollow">http:&#x2F;&#x2F;clang.llvm.org&#x2F;docs&#x2F;ClangFormat.html</a>
jghalmost 12 years ago
While I can appreciate style guidelines for code, I can&#x27;t help but feel like this level of pedantry is excessive and probably a total waste of time in most cases.
评论 #5964058 未加载
评论 #5964052 未加载
评论 #5964079 未加载
marksands07almost 12 years ago
clang-format exists to do the same thing <a href="http://clang.llvm.org/docs/ClangFormat.html" rel="nofollow">http:&#x2F;&#x2F;clang.llvm.org&#x2F;docs&#x2F;ClangFormat.html</a>
natchalmost 12 years ago
$ pip install ocstyle -bash: pip: command not found