Deploymate #pragma preprocessor directives

In case you're getting some annoying false positives or you simply want to exclude parts of your code from being analyzed for unavailable APIs, you can use Deploymate #pragma directive. Pragmas are used the same way Clang handles diagnostic/warnings suppression, that is, with stack-like push and pop commands. Simply, developers just need to push a #pragma command before the handled API call and pop it after and Deploymate will ignore everything between the two matching push/pop pragmas. Example follows.

#pragma deploymate push "ignored-api-availability" //skip analysis on the next line
	NSDictionary *jsonObject = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
#pragma deploymate pop

comments powered by Disqus