Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle shortcut for nested property #71

Open
0x26res opened this issue Oct 22, 2024 · 0 comments
Open

Handle shortcut for nested property #71

0x26res opened this issue Oct 22, 2024 · 0 comments

Comments

@0x26res
Copy link

0x26res commented Oct 22, 2024

For context, I have a libs.versions.toml file to express the versions of my library in gradle, it looks a bit like this (full example here

[versions]
groovy = "3.0.5"
checkstyle = "8.37"

[libraries]
groovy-core = { module = "org.codehaus.groovy:groovy", version.ref = "groovy" }
groovy-json = { module = "org.codehaus.groovy:groovy-json", version.ref = "groovy" }
groovy-nio = { module = "org.codehaus.groovy:groovy-nio", version.ref = "groovy" }
commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version = { strictly = "[3.8, 4.0[", prefer="3.9" } }

It's using a short cut, version.ref = "groovy", instead of version = {ref = "groovy"}. This confuses toml-sort.

[libraries]
groovy-core = {module = "org.codehaus.groovy:groovy", version. = ref = "groovy"}
groovy-json = {module = "org.codehaus.groovy:groovy-json", version. = ref = "groovy"}
groovy-nio = {module = "org.codehaus.groovy:groovy-nio", version. = ref = "groovy"}
commons-lang3 = {group = "org.apache.commons", name = "commons-lang3", version = {strictly = "[3.8, 4.0[", prefer = "3.9"}}

[versions]
groovy = "3.0.5"
checkstyle = "8.37"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant