I'm using sonarqube and I've kind of messed up the rules inside the sonar way profile. Is there a way to put it back as it was before ? Like updating the java plugin. Because I don't find the list of rules inside the default "sonar way" profile on the sonarqube web site.
Thanks.
On the profiles page, there's a down-arrow next to the 'Create' menu at the top of the column on the left. It offers two options:
Restore Profile - restore a single, specific profile from a backup file that you'll upload
Restore Built-in Profiles - restore all default profiles for a single, specific language.
You want the latter.
Related
I am trying to use atom with git to work on a coding project with some class mates, for this particular project we are supposed to practice making different classes. I just pulled the most recent version of the project from git and I now see that they were successfully able to create new classes/tab-things but have it still within the main file. How do I do something like this in atom? I can't ask them because they use a different ide.
In the picture you can see different classes in drop-downs but its still within "project2" - how do I do this for another class and have it in a new drop down and upload it to git?
image of what i'm looking at
From the screen shot, those dropdowns appear to simply be diffs from the git log. So if you want your changes to appear in a similar fashion, you'll need to create the classes (or additional files) and commit/push them.
I can't seem to find a setting in Eclipse to save and back-up a single Project to multiple paths.
I have a single Java Project in Eclipse that I save on my local machine and either save as... or copy replace to a local network and local mass storage, for BACKUP. I'd like that to occur on any, all Project saves.
I saw Project properties, but I'm not too familiar with Eclipse and team dev options, and I don't want to F the paths, links, etc.
Thanks.
EDIT: I'll try what user101 recommended, but to avoid confusion, My own personal, primary Linux box is where development is performed. The other locations are, for lack of a better word, BACKUPS. I used the term "Sync" for the sake of what my question may be related to.
Sorry for any confusion.
What I understood is that you want the sources from different paths , if so You can try as below
1> Create new java project
2> Click on link additional source
I'm currently developing an Eclipse plug-in that adds its custom launch configurations, which are linked to certain Resources in the workbench.
Background: sometimes, the underlying Resource would change, making the launch configuration invalid, and should not be runnable
How do I programatically remove a launch configuration from the recent launches drop down?
I mean this little downward facing arrow:
This would show all the recent launch configurations that were launched recently.
EDIT: I'm currently trying to access the history via the LaunchConfigurationManager and I can't seem to find an API that can tell me where I can get the proper instance, currently everything is null.
SECOND EDIT: The LaunchConfigurationManager is part of an internal package, it should not be used.
Background: sometimes, the underlying Resource would change, making the launch configuration invalid, and should not be runnable
Why would you want to remove an 'invalid' launch configuration from the history but leave it intact otherwise? If it is invalid, remove it entirely or repair it. But that's just my two cents without knowing the details of your application.
If you are willing to take the risk and use internal API you should be able to get the LaunchHistory via DebugUIPlugin.getDefault().getLaunchConfigurationManager()lgetLaunchHistory().
But have you tried to remove and re-add the invalid launch configuration right away to just remove it from the history?
ILaunchConfigurationWorkingCopy workingCopy = launchConfig.getWorkingCopy();
workingCopy.delete();
ILaunchConfigurationType launchType = launchConfig.getType();
IContainer container = launchConfig.getFile() == null ? null : launchConfig.getFile().getParent();
ILaunchConfigurationWorkingCopy newLaunchConfig = launchType.newInstance( container, workingCopy.getName() );
// copy all attributes from 'launchConfig' to 'newLaunchConfig'
newLaunchConfig.doSave();
In order to reflect the deletion of a Resource it needs to be linked with the launch configuration, using ILaunchConfigurationWorkingCopy.setMappedResources(IResource[])
Afterwards, when you delete this resource from the workspace (whether also on disk or not) this will hide the launch configuration that has this resource mapped to it.
My solution was to include that method call in the performApply() method of the used AbstractLaunchConfigurationTab
Link for the ILaunchConfigurationWorkingCopy API where I found this
P.S. Now when a resource is deleted (but not on disk, you can try this with a Project with regards to a normal Java Launch Configuration) and then re-added, the launch configuration is back up with all past details
i have a local sonar server running. i would like to create a new profile with a set of rules that were predefined by someone else. i have the XML file containing all the rules.
is there a way to upload the XML file to the profile and not define the rules manually?
thanks
Make sure you are logged into Sonar.
Click on Quality Profiles in the top navigation bar, then click on "Restore Profile" on the right hand side under the search bar. Make sure you have all the applicable quality plugins that the export is using or the restore will choke.
May be a bit old thread but worth answering this question with exact steps as I struggled alot with this problem.
Though its a hacky way to import rulebook from prod to your local. But it works and can save valuable time.
Here are the steps:
Login to SonarQube as admin.
Create a new Quality Profile as below:
Download the default xml from local sonarqube by clicking on Backup button. Lets call this file local-rulebook.xml
Open both the prod-rulebook.xml file & local-rulebook.xml in notepad.
Delete the selected part from local-rulebook.xml & replace with the content from prod-rulebook.xml. Save the file.
P.S: Do not change the value of <profile><name>{yourProfileName}</name>.
Go back to sonarQube and Click Restore at top-right corner of the screen.
Import the newly updated file
Change the default profile type.
Congrats you successfully imported the prod-rulebook.xml to your local sonarqube.
By means of Markers i was able to find the number of errors(marked red by the eclipse).Is it possible to find these errors by use of "compilation unit"??If yes then how to do it using the compilation unit??Plz suggest.
At the moment I'm using Indigo, so that my answer is referred to this release of Eclipse.
On options of Marker View you can change Configure Content options and create a new configuration. With this new configuration, I suggest you to change Scope to On selected element and its children. Doing so, if you click on a package or a single file (i think this is your definition of 'compilation unit'), you can filter problems using selected element. This also gives you number of problems as the filter you applied.