Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Apr 2, 2024
1 parent 140d9a1 commit 7f353ba
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ abstract class ApplyFilePatches : BaseTask() {
commit()

if (result.exit != 0) {
throw Exception("Failed to apply ${result.summary.failedMatches}/${result.summary.failedMatches + result.summary.exactMatches + result.summary.accessMatches + result.summary.offsetMatches + result.summary.fuzzyMatches} hunks")
val total = result.summary.failedMatches + result.summary.exactMatches +
result.summary.accessMatches + result.summary.offsetMatches + result.summary.fuzzyMatches
throw Exception("Failed to apply ${result.summary.failedMatches}/$total hunks")
}

if (!verbose.get()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ abstract class RebuildFilePatches : BaseTask() {
}

if (atFileOut.isPresent) {
AccessTransformFormats.FML.writeLF(atFileOut.convertToPath(), oldAts, "# This file is auto generated, any changes may be overridden!\n# See CONTRIBUTING.md on how to add access transformers.\n")
AccessTransformFormats.FML.writeLF(
atFileOut.convertToPath(),
oldAts,
"# This file is auto generated, any changes may be overridden!\n# See CONTRIBUTING.md on how to add access transformers.\n"
)
}

// rebuild patches
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* paperweight is a Gradle plugin for the PaperMC project.
*
* Copyright (c) 2023 Kyle Wood (DenWav)
* Contributors
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 only, no later versions.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*/

package io.papermc.paperweight.util

import atFromString
Expand Down

0 comments on commit 7f353ba

Please sign in to comment.