Intellij: Request: automatically format *.bzl files on save

Created on 31 Dec 2017  路  4Comments  路  Source: bazelbuild/intellij

It'd be nice if there the Bazel plugin had an option to automatically format bzl files on save. When using the open source Bazel, you tend to accumulate many bzl files, mostly related to third_party.

Most helpful comment

I found a workaround in the mean time:

  1. Install FileWatcher
  2. Setup a rule like so: You probably want to disable "Auto-save edited files", it's very aggressive.

intellij

All 4 comments

I found a workaround in the mean time:

  1. Install FileWatcher
  2. Setup a rule like so: You probably want to disable "Auto-save edited files", it's very aggressive.

intellij

The bazel team is working on a Skylark-specific linter/formatter (separate to buildifier for BUILD files). Once that's out, we'll look at auto-formatting .bzl files on save.

According to the buildifier codebase, this feature seems to be present - and it looks like the Bazel plugin has started linting my .bzl files. Has this been added and can this issue therefore be closed?

Thanks, it is fixed now, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sambercovici picture sambercovici  路  9Comments

davido picture davido  路  6Comments

Maririri picture Maririri  路  7Comments

sundermann picture sundermann  路  5Comments

KaoruDev picture KaoruDev  路  3Comments