AppCode reports error as warning when building.

Answered

Hi, i have some problems getting build issues reported as errors and not warnings. Let me give you an example:

I have a class method i added a parameter to. In another place i call it, but now it has the wrong parameters.

If i go to that place, it is marked red in the code and i get a "cannot resolve method" hover.

 

However, when i build it, i don't get an error, but just a warning:

Warning:(80, 32) class method '+myMethod:data:initialObject:actionTitle:target:action:' not found (return type defaults to 'id')

 

I have looked everywhere in preferences/editor/inspections, and have tried marking all relevant stuff as "error". See screenshot:

Pointers to what i can do much appreciated.

0
1 comment
Avatar
Permanently deleted user

Mathias,

First of all, makes sense to check how the build issue is reported in Xcode (try building the same target there). If it's also a warning there, then behavior is expected. Inspection settings (what you're looking at in Preferences) have nothing to do with build messages coming from Xcode build system (which AppCode is using). Red code and "cannot resolve" message is produced by AppCode's resolve engine - it may also make sense whether the method call with wrong parameters is resolved in Xcode in the same case (e.g. try navigate to declaration there). If the method is resolved in Xcode, then, probably, AppCode could be more loyal to the erroneous call, but that's a separate thing.

0

Please sign in to leave a comment.