Question

AppCode is great utility for refactoring and review code. Last time I use Code Inspector in menu: 'Code -> Code Inspect...', but this code inspector have some troubles.

General trouble, when code inspector found trouble with 'Unused statement' with .h file. For example, I have MyClass.h and MyClass.m files. And in MyClass.m AppCode finding Unused statement who is MyClass.h file.

So, how to remove this warning from code inspector? And why I get this warnings? from what?

Thanks.

Was it helpful?

Solution

I added a new class called NewClass, than i run Inspector. As suspected, it told me that class is never used in my project. Indeed, class is in Unused Code section of Inspection Result.

Name:                NewClass.h       
Location:            file NewClass.h       
Problem synopsis:           
Interface 'NewClass' is never used (at line 11)         
Problem resolution:           Safe delete the interface 'NewClass' 

If you want to mute this control, go to Preferences, Inspection and in Unused Code section and uncheck Unused class check. You can see that something is unused since is marked with gray colour.

This answer is based on 1.6.2 and making a naive guess on the cause.       

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top