Use Sonar with Objective-C language definition - objective-c

I've found a blog post that describes how to use CPD on an Objective-C project. The author also provided a CPD language library for ObjectiveC. Unfortunately, the GUI provided by the Violations plugin in Jenkins is rather ugly. The visualization that Sonar uses is much more helpful in analyzing the code.
The following command is used to generate the corresponding CPD output:
java
-Xmx512m
-classpath pmd-4.2.5.jar:ObjCLanguage-0.0.6-SNAPSHOT.jar
net.sourceforge.pmd.cpd.CPD
--minimum-tokens 100
--files [Path to XCode project classes]
--language ObjectiveC
--encoding UTF-8
--format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml
As far as I know, the project language can be configured in the Sonar plugin configuration at Jenkins. But how can I tell Sonar to use the ObjCLanguage library? I only need this for detecting code duplication and visualization by Sonar (since it is so much prettier).

If you want to have analysis results in Sonar, you need to install a Sonar plugin that brings support for the language. However, there's currently no plugin for Objective-C, so you won't be table to get what you're trying to achieve... unless you develop this plugin! ;-)

There seems to be ongoing work on an Objective-C plugin for Sonar. You may find it at https://github.com/fhelg/sonar-objective-c

I have also seen another Objective-C plugin for Sonar:
https://github.com/octo-technology/sonar-objective-c

Related

How to run a Rust GTK app in IntellIJ IDEA

I have been using the following GTK Rust template - https://gitlab.gnome.org/World/Rust/gtk-rust-template
Has anyone got any experience running this using IntelliJ IDEA with the Rest plugin? Because of the various .gresource etc. files doing a pure Cargo build is not possible, and instead, it uses Meson to orchestrate the build. Any advice on how to make it work?

Where to find (install) Kotlin cinterop tool on Mac

I would like to try to build Kotlin/Native project with dependencies on some library.
As documentation explains, I need to create def file (which I was already created) and run cinterop tool.
However, I wasn't able to find this tool on my Mac and curious how this could be installed.
Can you please give me some advice?
I strongly advise you to use Gradle + Kotlin MPP plugin. Not only it will provide cinterop support, but it will ease further development, testing, and multiplatform support. It works on any OS, of course.
If you need an example, here is the official one for the cURL library: https://github.com/JetBrains/kotlin-native/blob/master/samples/libcurl/build.gradle.kts. Note the cinterops block under compilations["main"].
The nice thing about Kotlin MPP plugin is that it actually allows you to play with the Kotlin/Native tools directly. It will download the tools specifically for your platform automatically on the first run and place them in ~/.konan directory. So if you really want to use cinterop tool from CLI you'll be able to find it there: ~/.konan/kotlin-native-macos-1.3.61/bin/cinterop. klib and kotlinc are there as well.

How can I check the build command for my JavafX app in IntelliJ IDEA

Im creating a JavaFX application in IntelliJ IDEA, and I am new to IntelliJ.
I would like to be able to compile my JavaFX application on a Raspberry Pi, but my app is quite complex and relies on 3rd party libraries, etc.
I would like to be able to see what exactly is going on in IntelliJ when I run "Make Project"
Is there a command line output screen that Im simply missing? I want the exact command that IntelliJ uses to compile the application.
Essentially, on the Pi, I want to get the code from my repo, run the compilation command and produce an executable JAR on demand.
I have of course read the doco on how to compile a JavaFX application, but if I could see what IntelliJ does, that would be fantastic.
So far I haven't found such an option but the process is most likely some sort of flow based on IntelliJ plugins and the documentation seems to support this theory.
Perhaps you'd consider using a software management and build tool such as maven or ant or something similar. This should give you (almost) unlimited options to configure your desired build sequence and 3rd party dependencies.

Is there an eclipse plugin for Play2?

I know there is one for play1, but I don't find any for play2.
I hope the plugin can compile the templates to scala code automatically. It's not convenient now.
I just came across Scala IDE Play2 plugin for Eclipse Indigo/Juno and Scala IDE. The current features are
Syntax Highlighting (routes and templates)
Code completion (templates)
Formatter (routes)
Hyperlinking (routes and templates)
Note that hyperlinking to Java files is not supported for now. Also there are some limitations for the code completion feature, just take some time to read the doc. I didn't try it myself as I'm not working with Play2 right now, but thought it might be helpful for someone.
Edit: This answer is outdated. A Play Eclipse plugin has been written, as #Baztoune says.
There is no Play 2 plugin for Eclipse at the time I’m writing these lines. However, there is an eclipsify sbt command, provided by the Play 2 sbt plugin, which is able to generate an Eclipse project from a Play 2 application.
You won’t get syntax highlighting, contextual completion or code navigation inside Play 2 templates, but you can have them to be automatically compiled when saved by using the ~run sbt command (instead of just run). Check the Eclipse “General −> Workspace −> Refresh using native hooks or polling” option is enabled so it will take compiled templates changes into account.
Yes, here's how to get started:
Find the correct update site for your version of Eclipse from http://scala-ide.org/download/current.html.
In Eclipse go to Help->Install New Software. Use the update site from above to locate Scala related plugins.
Install both the Scala IDE for Eclipse plugin and the Play2 support in Scala IDE plugin. Note that the Play2 support in Scala IDE plugin is listed under the Scala IDE plugins checkbox.
I was unable to get this working at all starting from bare Eclipse, as many sources have suggested doing. The problem seems to be incompatible dependencies that only show up after much wasted time. The Scala IDE route eliminated this problem.
Yes. That's Scala IDE.
Update Site for Eclipse Juno and Kepler: http://download.scala-ide.org/sdk/e38/scala210/stable/site
Install with the following features:
Scala IDE for Eclipse
Scala IDE Plugins (incubation)
I use Scala IDE from http://scala-ide.org/ , then eclipsify my play2 project and import.
It works like a charm: it compiles my scala/java code.
You can get more details at this URL http://scala-ide.org/docs/tutorials/play20scalaide20/index.html

Using Maven as build tool for Lua programs

I need a build tool for compiling,testing, reporting and the deployment of Lua programs.
I chose Maven 2 because of our Polarion version supports it.
Unfortunately, I couldn't find any Maven plugins/archetypes for Lua.
As I am a newbie in Maven I want to know whether it is difficult to write a customized Lua plugin for Maven.
You can hook up the maven-compiler-plugin with any plexus compiler (reference here).
So I guess the standard way would be to write a plexus wrapper for the lua compiler using the Plexus Compiler API