2

I have used JNA to call functions from a C library. But the class names in the C library start with simple letters and some of the structure names as well. These are causing sonar qube to report naming convention issues which are "major". Is there any way I can handle this naming issues without deleting the rule from sonar qube? Are there any way to map the native methods without using the same name as in the C library?

AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
  • https://jna.java.net/javadoc/overview-summary.html#function-mapping looks like the thing you want to do – zapl Nov 27 '15 at 10:21
  • 5
    "These are causing sonar qube to report naming convention issues which are "major"" <-- you use a code quality analysis tool which is fine; however, _do not_ be a slave to it! – fge Nov 27 '15 at 10:21
  • Can you provide a very simple example of code which raise such unexpected issues? – Wohops Nov 30 '15 at 15:49

1 Answers1

0

As of today there are no way to configure the rule about method naming convention for native methods and classics java methods.

So your best course of action would be either to improve the regexp of the naming convention rule to accept the native methods naming convention or mark issues on native methods as won't fix

benzonico
  • 10,635
  • 5
  • 42
  • 50
  • What about the function mapping in JNA? I can't find any examples on it anywhere. Its there for this issue right? – AnOldSoul Nov 30 '15 at 15:14