Page MenuHomePhabricator

csharp: Function coding style changes

Authored by lauromoura on Apr 15 2019, 2:51 PM.



This commit suppresses some warnings from the fields that represent
imported functions from C.

Depends on D8612

Diff Detail

rEFL core/efl
csharp_conventions (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 10855
Build 8441: arc lint + arc unit
lauromoura created this revision.Apr 15 2019, 2:51 PM
lauromoura requested review of this revision.Apr 15 2019, 2:51 PM

I was looking at the kind of warnings you are suppressing and I came across these docs:

It talks about NativeMethods classes which are treated specially by StyleCop. Have you tried that? If all native delegates are put inside an internal NativeMethods class, code might be much cleaner (and you won't need to suppress so many warnings for each native method).

If that does not work, won't it still be shorter to group all native delegates inside a #pragma warning block?

#pragma warning disable SA1307 // AccessibleFieldsMustBeginWithUpperCaseLetter
#pragma warning restore SA1307

This tab belongs to line 62 below (otherwise there are two tabs here and none in front of public delegate).

segfaultxavi requested changes to this revision.Apr 16 2019, 2:57 AM
This revision now requires changes to proceed.Apr 16 2019, 2:57 AM
lauromoura planned changes to this revision.Apr 16 2019, 7:14 AM

I have a working patch here moving the NativeInherit classes into a nested NativeMethods class. I'll do some more tests whether these SuppressMessage directives are necessary.

lauromoura abandoned this revision.Apr 17 2019, 12:21 PM

Abandoning as this will be split in future diffs.