You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `-tables` option makes it possible to specify a JSON file whose
properties define arguments that will be passed to the
`tables.OverrideTables()` function such that other projects can define
their own constraints on argument formatting. This is valuable to
Buck or Skylark users that define rules that need to be formatted in a
way that is different from buildifier's defaults.
Test Plan:
* Added a test: `tables/jsonParser_test.go`.
* Verified that `bazel test //...` succeeds.
* Created a JSON config for Buck and verified the output of the
following was what I expected when run from the Buck repo:
```
export BUILDIFIER_DIFF="diff -u"
find . -name BUCK | xargs -I {} ../buildifier/bazel-bin/buildifier/buildifier -buildifier_disable=label -tables=buildifier.json -d {}
```
For this test, the contents of `buildifier.json` were:
```
{
"IsLabelArg": {
},
"LabelBlacklist": {
},
"IsSortableListArg": {
"deps": true,
"exported_deps": true,
"provided_deps": true,
"srcs": true,
"visibility": true
},
"SortableBlacklist": {
"genrule.srcs": true
},
"SortableWhitelist": {
}
}
```