False positive on `Move all #include directive at the very top of the file, before any code`

Hello,

Sonarcloud signals false positives for the following rule on ObjC classes:

https://rules.sonarsource.com/objective-c/RSPEC-954
Move all #include directives at the very top of the file, before any code.

It suggests above with a very simple file header like this:

//
// Created by XXX on XXX.
// Copyright (c) XXX XXX. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h> 

It gives above error for UIKit import and any following import lines.

Should we just ignore the error? Is this a known issue?

Thanks

Hi @manuyavuz-pointr,

thank you for your report, ticket created: CPP-2361.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.