nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.63k stars 623 forks source link

Duplicate header generated #1608

Closed timbms closed 5 months ago

timbms commented 5 months ago

Running swiftformat in the new year 2024 generates a duplicate header:

// Copyright (c) 2010-2024 Contributors to the openHAB project
//
// See the NOTICE file(s) distributed with this work for additional
// information.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0
//
// SPDX-License-Identifier: EPL-2.0

// Copyright (c) 2010-2023 Contributors to the openHAB project
//
// See the NOTICE file(s) distributed with this work for additional
// information.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0
//
// SPDX-License-Identifier: EPL-2.0 

Relevant part of .swiftformat is: --header "// Copyright (c) 2010-{year} Contributors to the openHAB project\n//\n// See the NOTICE file(s) distributed with this work for additional\n// information.\n//\n// This program and the accompanying materials are made available under the\n// terms of the Eclipse Public License 2.0 which is available at\n// http://www.eclipse.org/legal/epl-2.0\n//\n// SPDX-License-Identifier: EPL-2.0"

swiftformat "0.52.7" is run as https://github.com/nicklockwood/SwiftFormat#xcode-build-phase

nicklockwood commented 5 months ago

@timbms fixed in 0.53.1