Indeed, currently, if you copy quality profile Foo and give it "Bar" name whereas Bar already exists, then Bar is fully overwritten without any notice.
- Create a Java profile with 1 rule
- Copy this profile and specify "Sonar way"
- => the existing "Sonar way" is fully overwritten and has only 1 rule
We should not prevent this action as it could be useful in some cases, but just warn the user about what he's doing. So when clicking on "Copy", the modal window should display the following message:
You are about to copy this quality profile into the existing "XXXX" profile, which will fully overwrite this profile. Do you really want this?