fresh-cat-90827
01/05/2022, 8:16 PMupdate-build-files
is great because fmt
will format your BUILD
files code. However, I wonder how difficult would it be to extend the goal to let user pick a formatter (currently only black
is supported). The code of interest: https://github.com/pantsbuild/pants/blob/d3b1d24372a60aca0cbd3c54b73363ddfac4b883/src/python/pants/core/goals/update_build_files.py#L258-L257. It would be helpful to be able to choose a formatter for the BUILD
files. Is it something trivial or would it require a deeper thought?hundreds-father-404
01/05/2022, 8:20 PM--update-build-files-fmt
, and I think it probably makes sense to keep that. Maybe we add a new option --update-build-files-formatter={black,yapf}
?
Note that it doesn't make sense to add isort and autoflake because imports are banned. docformatter feels like overkillfresh-cat-90827
01/06/2022, 4:21 PM--update-build-files-formatter={black,yapf}yes, that’s exactly what I thought. I think keeping it to
black
and yapf
will sufficehundreds-father-404
01/06/2022, 5:18 PMfresh-cat-90827
01/06/2022, 5:19 PM