16

Large projects with multiple developers often result in code that is inconsistent in style. I am looking for a lint-like tool tailored to Objective-C that goes beyond the scope of the Clang Static Analyser and checks for adherence to stylistic conventions; e.g. braces, indentation, comment formatting, declaring variables at the top of functions and so on.

I am aware of AnalysisTool, but it doesn't quite do what I'm after. I saw this question asked elsewhere on SO, but it's not clear whether the question-asker was after the same thing.

Does such a tool exist?

Community
  • 1
  • 1
Aidan Steele
  • 10,999
  • 6
  • 38
  • 59

2 Answers2

9

I was doing the same research and I just found OCLint

clopez
  • 4,372
  • 3
  • 28
  • 42
3

I have recently stumbled across uncrustify, which has support for Objective-C. It appears well-written and adding additional checks (and respective fixes) seems straight-forward.

It's not all-in-one, but in combination with the static analyser and a good differencing tool, it should do the job.

Aidan Steele
  • 10,999
  • 6
  • 38
  • 59
  • 3
    I thought uncrustify was a formatting tool. How does it check style issues (other than formatting)? – Ira Baxter Jul 20 '12 at 17:39
  • 2
    @BrianLiang: I was answering my own question. It was the answer I was looking for! – Aidan Steele Feb 21 '13 at 02:38
  • 1
    I think you should edit your question then.. because it's unclear that your looking for a tool to help you format vs a tool that check that formatting is correct... – Hugues BR Nov 04 '15 at 20:01