gn format doesn't infer custom variable type
Reported by
ingem...@opera.com,
Jul 4 2016
|
|
Issue description
Version (gn): 403392
What steps will reproduce the problem?
gn format --stdin <<EOF
action("test") {
sources = [ "somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java" ]
custom_variable = [ "somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java" ]
}
EOF
What is the expected output?
action("test") {
sources = [
"somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java",
]
custom_variable = [
"somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java",
]
}
What do you see instead?
action("test") {
sources = [
"somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java",
]
custom_variable =
[ "somewhat/long/path/to/src/org/chromium/components/test/JavaClass.java" ]
}
Discussed in https://codereview.chromium.org/2110543004/. gn format (and thus git cl format) seems to assume any "custom" variable is of a non-list type. This means list declarations like "java_files" is formatted differently than "sources", even when they both are lists.
|
|
►
Sign in to add a comment |
|
Comment 1 by ingem...@opera.com
, Jul 4 2016