JnRouvignac / AutoRefactor

Eclipse plugin to automatically refactor Java code bases
Other
175 stars 37 forks source link

Comments rule breaks copyright header #390

Open vogella opened 5 years ago

vogella commented 5 years ago

I have the following

/*******************************************************************************
 * Copyright (c) 2005, 2015 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 ******************************************************************************/

If I run the Comments refactoring I get the following

/**
 * Copyright (c) 2005, 2015 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 */

Would be nice if the copyrright header could remain unchanged.

Fabrice-TIERCELIN commented 5 years ago

I admit, it's not my favorite rule :) Actually, I disable it :) If I had to migrate the rules, I would leave this one behind.

vogella commented 5 years ago

Bye the way, is there page which describes the implemented rules? I have to admit that I did not yet look at the code but I did not see an explanation on the project page nor in the installed tool. Maybe I did not look enough...

Fabrice-TIERCELIN commented 5 years ago

I think the best available description is the comparison before/after from the test samples: http://autorefactor.org/html/samples.html (CommentsSample.java)

vogella commented 5 years ago

Thanks @Fabrice-TIERCELIN