We are running SonarQube Developer Edition Version 7.7 (build 23042).
We are using the same copyright block at the beginning of each Java file:
/* * Copyright 2019 by Example <email@example.com> * * This software contains free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License ("License") as * published by the Free Software Foundation (version 3 of the License). * This software is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the copy of the * License you received along with this software for more details. */ package com.example;
SonarQube detects a code duplication for each file:
Source files should not have any duplicated blocks
This seems to be a false-positive. I could deactivate the rule however I still want SonarQube to find “real” code duplications. How can I handle this issue?