Coming from Warchant/pre-commit-buildifier#16, I could further debug this and found that running buildifier --lint=warn on a file with a warning that every warning is printed twice.
I took me some time further debugging this, and I realized the root cause was my .buildifer.json config which enabled warnings with +warning that are also enabled by default. Hence the warning was printed twice.
I think you might have to build a unique list of warnings before processing them to avoid that users see error messages multiple times.