How can I automatically load the Google Style Rules to SonarQube? - sonarqube

I have found this xml with style rules: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml .
I would like to save developers time from manually flagging non-conformities by loading the list into SonarQube but I haven't been able to figure out how.
Anyone able to help me?

Instead of loading the rules (you'd have to write a plugin for that) consider just loading the issues. The Generic Issue Data feature was added recently (7.2) for just that case.

Related

NativeScript markingMode: none errors

I'm part of a team that's using NativeScript and angular and we keep getting errors that look like:
Error: com.tns.NativeScriptException: Attempt to use cleared object reference id=<some-object-id-number>
From some research it's because we use markingMode: none in order to speed up our application. We want to keep using this so we need to find the source of the errors. From the documentation, it comes from creating a native object then wrapping it in a JS method so the garbage collector removes the native object in the method but since it's still being referenced an error is thrown. The documentation also indicated that this most likely stems from using plugins that haven't adapted to markingMode: none. The plugin I believe that's causing this is the nstudio nativescript-checkbox plugin. So I looked through the source code to try to find the native options that fit the criteria and my issues are the following:
I'm not sure if I'm finding all the native objects.
I don't know where to release them in the code.
I'm not sure if this plugin is the only one that's causing issues (we use a lot of plugins and all of them are pretty integral to our code).
I scoured our code base and couldn't find any instances where this may be a problem, but I could be wrong.
If anyone has experienced this markingMode: none issue, specifically with plugins, I would love to hear how you dealt with it and if you had any tips/suggestions moving forward. Here's the documentation detailing this issue:
https://docs.nativescript.org/core-concepts/android-runtime/advanced-topics/marking-mode-none
The NativeScript developers said it was fixed in this bug fix with an update, but I haven't noticed a change:
https://github.com/NativeScript/NativeScript/issues/7125
UPDATE: I commented out the checkbox plugin and no error, this is definitely being caused by the plugin
Removed all instances of the checkbox component and the side navigation bar and made our own custom components for them.

Disable "intelligent" anchor look up of link dialog

When adding a link using the default link-plugin, I want to be able to write "what-ever", e.g. #my-id. The link-plugin, doesn't allow this. It extracts all possible "anchors" in the current text being edited, but in my case, it is just part of a bigger "page".
Any ideas on configuration options, or do I need to write a custom plugin?
There are numerous suggestions around on how-to configure the existing plugins and remove UI-elements etc. It does not work in current version (4.4.3), but thankfully you can build your own plugin and remove the existing one, quite easily. There's a good explanation of a similar plugin in the documentation: http://docs.ckeditor.com
I also wrote a bit about this here: http://danielwertheim.se/2014/08/15/ckeditor-the-link-plugin-is-painfully-clever/

Sonar 4.1.1 : how to write custom xpath rule for PHP

I saw some post on SO referring to xPath templates for PHP. But the version I am currently using (4.1.1) does not have those templates anymore.
Does somebody know how to add custom rules from this version on?
Thanks in advance
It is no longer possible to add custom rules for PHP. We'll eventually add the support of writing custom rules in Java (as it is currently the case for Java and COBOL). See http://docs.codehaus.org/display/SONAR/Extending+Coding+Rules.
Note that if you think that your custom rules might benefit others, you can submit them on the developer list (http://www.sonarqube.org/resources/join-our-community/). If we find them valuable, we'll implement them.

CodeIgniter 2.1.0 Template Library

Recently CI 2.1.0 is out.
I have a question. As I recognized that the CI folder structure has been 'evolved' (easy to setup, automatically defines base_url,etc), I'm wondering if the current template libraries like Phil's,william's concept,ocular,etc.. can be adapted to this new CI version.
I've tried Phil's but no luck, I mean..I don't know if I'm missing something this time, and ocular, also, to no avail ( I don't subclass the Controller, as suggested here)
Any better templating suggestions that will be suited enough to the latest CodeIgniter 2.1.0?
Thanks.
It seems like from the comments above that you're having trouble finding any resources online on the matter. Here's my suggestion for you:
Check the CodeIgniter Change Log here, and compare all the changes between this newest release, and the release that you know last worked with the template libraries that you've mentioned above. Use deductive reasoning, and see if you can find a way to modify the templates you need to work with the current CodeIgniter structure. I know that's a lot of work, and is not ideal for your situation. Regardless, it's the best advice I can give at the current moment. Good luck, and happy reading!

Joomla plugin manager missing options, how do I start trouble shooting this?

There are no options displayed when I'm looking at a plugin with the plugin manager. Where there should be a menu for basic and advance options is just white space. How can I start trouble shooting this problem? Other installed extensions work fine and hours of searching about plugin options make me think this is a peculiar error. This is what my menu looks like http://i.stack.imgur.com/s2S4K.png
The plugin you are using is not written for Joomla 1.6, the XML manifest needs to be updated at the very least. The plugin itself may also need to be rewritten. I would start withe the XML file first, you can find details on the changes that need to be made here - http://www.theartofjoomla.com/home/9-developer/112-upgrading-a-plugin-to-joomla-16.html

Resources