BartyCrouch icon indicating copy to clipboard operation
BartyCrouch copied to clipboard

`overrideComments` option doesn't work

Open noah-nuebling opened this issue 1 year ago • 1 comments

Hi! The overrideComments option doesn't seem to work for me.

I can only get the comments to change in my Localizable.strings file if I first manually delete the comment from the .strings file before running bartycrouch update.

I've tested this on macOS 13.0 Beta 5 through Beta 8, using bartycrouch 4.11.0, and my .bartycrouch.toml looks like this:

[update]
tasks = ["interfaces", "code", "normalize"]

[update.interfaces]
paths = ["app", "helper", "accomplice"]
subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "frameworks", "tests", "*/external", "*/SupportFiles", "*/iOS-Polynomial-Regression-master"]
defaultToBase = false
ignoreEmptyStrings = false
unstripped = false
ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"]

[update.code]
overrideComments = true
codePaths = ["app", "helper", "accomplice"]
subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "frameworks", "tests", "*/external", "*/SupportFiles", "*/iOS-Polynomial-Regression-master"]
localizablePaths = ["./Localization"]
defaultToKeys = false
additive = false
unstripped = false
plistArguments = true
ignoreKeys = ["#bartycrouch-ignore!", "#bc-ignore!", "#i!"]

[update.transform]
codePaths = ["app", "helper", "accomplice"]
subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "frameworks", "tests", "*/external", "*/SupportFiles", "*/iOS-Polynomial-Regression-master"]
localizablePaths = ["./Localization"]
transformer = "foundation"
supportedLanguageEnumPath = "."
typeName = "BartyCrouch"
translateMethodName = "translate"
separateWithEmptyLine = true

[update.normalize]
paths = ["app", "helper", "accomplice"]
subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "frameworks", "tests", "*/external", "*/SupportFiles", "*/iOS-Polynomial-Regression-master"]
sourceLocale = "de"
harmonizeWithSource = true
sortByKeys = true
separateWithEmptyLine = true

[lint]
paths = ["app", "helper", "accomplice"]
subpathsToIgnore = [".git", "carthage", "pods", "build", ".build", "docs", "frameworks", "tests", "*/external", "*/SupportFiles", "*/iOS-Polynomial-Regression-master"]
duplicateKeys = true
emptyValues = true

My CLT output looks like this CleanShot 2022-08-15 at 17 57 43@2x

I'm using an M1 MBA, and I'm working on the version-3 branch of the Mac Mouse Fix repo.

Not sure if relevant but the normalize task doesn't seem to output anything after the ... so maybe there's something going wrong there?

Originally posted by @noah-nuebling in https://github.com/FlineDev/BartyCrouch/issues/38#issuecomment-1215220638

noah-nuebling avatar Sep 24 '22 23:09 noah-nuebling

@noah-nuebling Thank you for providing all these details. I might take a look at this in my next Open Source stream on Friday (find my exact schedule here). If you want to help me understand the problem in case I can't reproduce it with the information provided above, just join me in the chat.

Jeehut avatar Sep 25 '22 08:09 Jeehut

@noah-nuebling I just had a look at this in detail during my live stream and I re-implemented and documented the overrideComments configuration for the code > update command. It should work as soon as I can make a new release. If you need it right now, you can try installing the main branch, e.g. by checking out and running make install. Currently there's an issue with Homebrew and Xcode 14 / Swift 5.7 (see here).

FlineDevPublic avatar Oct 07 '22 15:10 FlineDevPublic

Thank you very much, glad to hear it's been resolved!

noah-nuebling avatar Oct 07 '22 16:10 noah-nuebling

I just made progress on the Xcode 14 front so I actually already started a new release 4.13.0 which includes this feature. Hope the Homebrew pipeline works this time: https://github.com/Homebrew/homebrew-core/pull/112557

Jeehut avatar Oct 07 '22 16:10 Jeehut