how to change hudson's default view? - hudson

i'm having problem with changing default view. can you say me how to do it properly? hudson's wiki can't help right now.

Oh. There is an option for it in configuration menu.
[EDIT] Manage Hudson/Configure System
(the default is All)

As William's answer notes, this is the proper way to change the default view.
Here is a sample dashboard view which I've configured to be the default one.
http://soafarm.wordpress.com/2012/06/19/sample-hudson-dashboard-2/
Note that once you've set up an alternate view as the default, it's possible to delete the original default view if you so desire.

Related

Disable rule in sonar

I want to disable a rule from Sonar so it doesn't show the results in the web page.
In my case I want to hide (or not capture) the results about trailing comments.
Is it posible to configure it somewhere?
Thanks.
The right way to do is to put something like this on sonar-project.properties file per project:
sonar.issue.ignore.multicriteria=e1,e2
# tab characters should not be used
sonar.issue.ignore.multicriteria.e1.ruleKey=squid:S00105
sonar.issue.ignore.multicriteria.e1.resourceKey=**/*.java
# right curly braces should be on a new line
sonar.issue.ignore.multicriteria.e2.ruleKey=squid:RightCurlyBraceStartLineCheck
sonar.issue.ignore.multicriteria.e2.resourceKey=**/*.java
There are docs here on how to ignore specific rules for specific files, which links to an example of how to search for specific rules, by language. This page on baeldung goes into additional detail better than the docs
You have to remove this rule in the quality profile that you are using to analyse your project.
Please refer to the documentation that describes all this: Quality Profiles in Sonar.
In web interface for particular rule just press Deactivate button:
Adding to #Vladmir's answer in a new answer as I am not able to comment.
You can not modify the built-in profiles. If you don't see the option of Deactivate, then copy the profile and set it as default. Now you will see the options to activate/deactivate.
An additional note for people ending up on this thread. I tested this quite a lot and finally found that setting common rules (anything that starts with "common-xxxx") from scanner side (pom, command line etc) will be ignored and it wont work. The language specific rules can be passed line arguments and thats why the "squid:S00105" rule is getting ignored correctly. Here is the issue link on the SonarQube JIRA board and it says that it "wont be fixed".
https://jira.sonarsource.com/browse/SONAR-8230
Here is the link to my answer: https://stackoverflow.com/a/60570763/1766402
on how to set it from UI.
You can't deactivate sonar way rules in a built-in profile. so you have to create your own profile by going to the Quality Profile section and choosing your desired language then click on the config icon the select copy with your favorite name and then you can change any rules in that
and then you can deactivate your considered rules
For Java, You can get sonarlint/sonarqube to ignore false-positives by just commenting //NOSONAR at the end of your code statement. As mentioned in my answer here

WindowsLookAndFeel - What font is used - Is there a way to change it

UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
What font gets used? If I have an app, which is using the windowslookandfeel, is there a way to change the font used on a local system, by changing the default font for this L&F - I am looking at changing Windows options - such as Control Panel/Registry/System Properties etc..
Thanks
Multiple default fonts are used in the Windows L&F. The most used one is Font.DIALOG, but it also uses Font.SANS_SERIF, and Font.MONOSPACED. Changing the default is done via the class UIDefaults (JavaDoc).

Changing MonoDevelop Encapsulation Template

Is it possible to change the template used by MonoDevelop when you right click a field in C# select Refactor -> Encapsulate Field?
I would like to change the default code that is inserted when this option is selected.
It's not a template, it's a method that constructs a property to match your code formatting settings.
What do you want to change? If it's something that should be influenced by code formatting settings, please file an enhancement bug.

Set sgml-mode as default in nXhtml

Well, I have already provided self-explanatory title. =) I use nXhtml for web development, and sgml-mode keybindings suite me better. Is there any chance that I can change default mode for HTML editing?
I reckon that this is probably an RTFM issue, but I find nXhtml documentation quite uptight. =/
Had you tried standard method of setting mode with
(add-to-list 'auto-mode-alist '("\\.html?$" . sgml-mode))
? I don't use nXhtml, so I don't know how it set handler for HTML files.

Overriding wp_get_archives for a theme in Wordpress

I am working my way through customizing the Worpress default theme. I came up against an issue of formatting archive links.
The default theme uses wp_get_archives function defined in general-template.php. The output of the function is customisable, but not customisable enough for me.
I can achieve everything I want to do by basically reimplementing that particular function in my functions.php file but I am hesitant to do so as it introduces regression issues as Wordpress gets updated. wp_get_archives does all the lower level stuff like constructs a DB query and caches the DB results. I would really like to avoid doing this if I can.
Another way open to me is to create get_archives_link filter at which point the link HTML is already formatted and I would need to run a bunch of regex to make sense of it. This seems completely backwards to me as it would completely kill the performance.
Here is exactly what I want output:
<li>JAN</li>
<li class="current">FEB</li>
<li>MAR</li> <!--no blog entries this month-->
...
As far as I can see wp_get_archives has hardcoded text of the anchor:
$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
Then thre is an issue of adding months that have no posts, I would much rather prefer to do that without parsing the text. Then I would need to add the current class (when the URL is something like .../2009/12).
I've actually got a solution that works using a copy of wp_get_archives. Is this the way to do things and do I worry too much about nothing?
EDIT I guess the real question is is it OK to write your oen SQL for a Wordpress theme? And if it is, what is the best practice in doing so.
If you define it in your functions.php file within your active theme, there shouldn't usually be a regression issue.
However, this isn't quite true when changing the default theme. If you were then to upgrade Wordpress by uploading the entire wordpress source, it would overwrite functions.php.
To solve this, duplicate the entire folder containing the Default theme. In the new copy, edit style.css and change line 2 (theme name) to a new theme name.
Theme Name: WordPress Default
Wordpress will now see an extra theme, which you can edit to your hearts' content.