Run buildifier

Change-Id: I8b7dbae701f353e2a3dbbd12ff81b22619718ead
diff --git a/aos/events/logging/BUILD b/aos/events/logging/BUILD
index b2be972..efbbcc6 100644
--- a/aos/events/logging/BUILD
+++ b/aos/events/logging/BUILD
@@ -68,6 +68,7 @@
         "@com_github_google_glog//:glog",
     ],
 )
+
 cc_binary(
     name = "logger_main",
     srcs = [
diff --git a/debian/matplotlib.bzl b/debian/matplotlib.bzl
index be520f3..7032745 100644
--- a/debian/matplotlib.bzl
+++ b/debian/matplotlib.bzl
@@ -100,146 +100,146 @@
 }
 
 def build_matplotlib(version, tkinter_py_version = None, copy_shared_files = True):
-  """Creates a py_library rule for matplotlib for the given python version.
+    """Creates a py_library rule for matplotlib for the given python version.
 
-  See debian/matplotlib.BUILD for the usage.
+    See debian/matplotlib.BUILD for the usage.
 
-  All the rules generated by this will be suffixed by version. Only one
-  instance of this macro should set copy_shared_files, which generate the
-  files that are shared between python versions.
+    All the rules generated by this will be suffixed by version. Only one
+    instance of this macro should set copy_shared_files, which generate the
+    files that are shared between python versions.
 
-  tkinter_py_version is used because for the Python3 instance, some files
-  are in folders named python3 and some are in folders named python3.5...
+    tkinter_py_version is used because for the Python3 instance, some files
+    are in folders named python3 and some are in folders named python3.5...
 
-  version numbers should both be strings.
-  """
-  if tkinter_py_version == None:
-    tkinter_py_version = version
+    version numbers should both be strings.
+    """
+    if tkinter_py_version == None:
+        tkinter_py_version = version
 
-  native.genrule(
-      name = "patch_init" + version,
-      srcs = [
-          "usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py",
-          "@//debian:matplotlib_patches",
-      ],
-      outs = [version + "/matplotlib/__init__.py"],
-      cmd = " && ".join([
-          "cp $(location usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py) $@",
-          "readonly PATCH=\"$$(readlink -f $(location @patch))\"",
-          "readonly FILE=\"$$(readlink -f $(location @//debian:matplotlib_patches))\"",
-          "(cd $(@D) && \"$${PATCH}\" -p1 < \"$${FILE}\") > /dev/null",
-      ]),
-      tools = [
-          "@patch",
-      ],
-  )
-
-  _src_files = native.glob(
-      include = ["usr/lib/python" + version + "/dist-packages/**/*.py"],
-      exclude = [
-          "usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py",
-      ],
-  )
-
-  _data_files = native.glob([
-      "usr/share/matplotlib/mpl-data/**",
-      "usr/share/tcltk/**",
-  ])
-
-  _src_copied = ["/".join([version] + f.split("/")[4:]) for f in _src_files]
-
-  _builtin_so_files = native.glob([
-      "usr/lib/python" + version + "/dist-packages/**/*x86_64-linux-gnu.so",
-      "usr/lib/python" + tkinter_py_version + "/lib-dynload/*.so",
-  ])
-
-  _system_so_files = native.glob([
-      "usr/lib/**/*.so*",
-      "lib/x86_64-linux-gnu/**/*.so*",
-  ])
-
-  _builtin_so_copied = ["/".join([version] + f.split("/")[4:]) for f in _builtin_so_files]
-
-  rpath_prefix = "rpathed" + version + "/"
-
-  _system_so_copied = [rpath_prefix + f for f in _system_so_files]
-
-  _builtin_rpaths = [":".join([
-      "\\$$ORIGIN/%s" % rel,
-      "\\$$ORIGIN/%s/%s/usr/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
-      "\\$$ORIGIN/%s/%s/usr/lib" % (rel, rpath_prefix),
-      "\\$$ORIGIN/%s/%s/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
-  ]) for rel in ["/".join([".." for _ in so.split("/")[1:]]) for so in _builtin_so_copied]]
-
-  _system_rpaths = [":".join([
-      "\\$$ORIGIN/%s/%s/usr/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
-      "\\$$ORIGIN/%s/%s/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
-  ]) for rel in ["/".join([".." for _ in so.split("/")[1:]]) for so in _system_so_copied]]
-
-  native.genrule(
-      name = "run_patchelf_builtin" + version,
-      srcs = _builtin_so_files,
-      outs = _builtin_so_copied,
-      cmd = "\n".join(
-          [
-              "cp $(location %s) $(location %s)" % (src, dest)
-              for src, dest in zip(_builtin_so_files, _builtin_so_copied)
-          ] +
-          ["$(location @patchelf) --set-rpath %s $(location %s)" % (rpath, so) for rpath, so in zip(_builtin_rpaths, _builtin_so_copied)],
-      ),
-      tools = [
-          "@patchelf",
-      ],
-  )
-
-  native.genrule(
-      name = "run_patchelf_system" + version,
-      srcs = _system_so_files,
-      outs = _system_so_copied,
-      cmd = "\n".join(
-          [
-              "cp $(location %s) $(location %s)" % (src, dest)
-              for src, dest in zip(_system_so_files, _system_so_copied)
-          ] +
-          ["$(location @patchelf) --set-rpath %s $(location %s)" % (rpath, so) for rpath, so in zip(_system_rpaths, _system_so_copied)],
-      ),
-      tools = [
-          "@patchelf",
-      ],
-  )
-
-  native.genrule(
-      name = "copy_files" + version,
-      srcs = _src_files,
-      outs = _src_copied,
-      cmd = " && ".join(["cp $(location %s) $(location %s)" % (src, dest) for src, dest in zip(
-          _src_files,
-          _src_copied,
-      )]),
-  )
-
-  if copy_shared_files:
     native.genrule(
-        name = "create_rc" + version,
-        outs = ["usr/share/matplotlib/mpl-data/matplotlibrc"],
-        cmd = "\n".join([
-            "cat > $@ << END",
-            # This is necessary to make matplotlib actually plot things to the
-            # screen by default.
-            "backend      : TkAgg",
-            "END",
+        name = "patch_init" + version,
+        srcs = [
+            "usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py",
+            "@//debian:matplotlib_patches",
+        ],
+        outs = [version + "/matplotlib/__init__.py"],
+        cmd = " && ".join([
+            "cp $(location usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py) $@",
+            "readonly PATCH=\"$$(readlink -f $(location @patch))\"",
+            "readonly FILE=\"$$(readlink -f $(location @//debian:matplotlib_patches))\"",
+            "(cd $(@D) && \"$${PATCH}\" -p1 < \"$${FILE}\") > /dev/null",
         ]),
+        tools = [
+            "@patch",
+        ],
     )
 
-  native.py_library(
-      name = "matplotlib" + version,
-      srcs = _src_copied + [
-          version + "/matplotlib/__init__.py",
-      ],
-      data = _data_files + _builtin_so_copied + _system_so_copied + [
-          ":usr/share/matplotlib/mpl-data/matplotlibrc",
-      ] + native.glob(["etc/**"]),
-      imports = ["usr/lib/python" + version + "/dist-packages", version, "."],
-      restricted_to = ["@//tools:k8"],
-      visibility = ["//visibility:public"],
-  )
+    _src_files = native.glob(
+        include = ["usr/lib/python" + version + "/dist-packages/**/*.py"],
+        exclude = [
+            "usr/lib/python" + version + "/dist-packages/matplotlib/__init__.py",
+        ],
+    )
+
+    _data_files = native.glob([
+        "usr/share/matplotlib/mpl-data/**",
+        "usr/share/tcltk/**",
+    ])
+
+    _src_copied = ["/".join([version] + f.split("/")[4:]) for f in _src_files]
+
+    _builtin_so_files = native.glob([
+        "usr/lib/python" + version + "/dist-packages/**/*x86_64-linux-gnu.so",
+        "usr/lib/python" + tkinter_py_version + "/lib-dynload/*.so",
+    ])
+
+    _system_so_files = native.glob([
+        "usr/lib/**/*.so*",
+        "lib/x86_64-linux-gnu/**/*.so*",
+    ])
+
+    _builtin_so_copied = ["/".join([version] + f.split("/")[4:]) for f in _builtin_so_files]
+
+    rpath_prefix = "rpathed" + version + "/"
+
+    _system_so_copied = [rpath_prefix + f for f in _system_so_files]
+
+    _builtin_rpaths = [":".join([
+        "\\$$ORIGIN/%s" % rel,
+        "\\$$ORIGIN/%s/%s/usr/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
+        "\\$$ORIGIN/%s/%s/usr/lib" % (rel, rpath_prefix),
+        "\\$$ORIGIN/%s/%s/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
+    ]) for rel in ["/".join([".." for _ in so.split("/")[1:]]) for so in _builtin_so_copied]]
+
+    _system_rpaths = [":".join([
+        "\\$$ORIGIN/%s/%s/usr/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
+        "\\$$ORIGIN/%s/%s/lib/x86_64-linux-gnu" % (rel, rpath_prefix),
+    ]) for rel in ["/".join([".." for _ in so.split("/")[1:]]) for so in _system_so_copied]]
+
+    native.genrule(
+        name = "run_patchelf_builtin" + version,
+        srcs = _builtin_so_files,
+        outs = _builtin_so_copied,
+        cmd = "\n".join(
+            [
+                "cp $(location %s) $(location %s)" % (src, dest)
+                for src, dest in zip(_builtin_so_files, _builtin_so_copied)
+            ] +
+            ["$(location @patchelf) --set-rpath %s $(location %s)" % (rpath, so) for rpath, so in zip(_builtin_rpaths, _builtin_so_copied)],
+        ),
+        tools = [
+            "@patchelf",
+        ],
+    )
+
+    native.genrule(
+        name = "run_patchelf_system" + version,
+        srcs = _system_so_files,
+        outs = _system_so_copied,
+        cmd = "\n".join(
+            [
+                "cp $(location %s) $(location %s)" % (src, dest)
+                for src, dest in zip(_system_so_files, _system_so_copied)
+            ] +
+            ["$(location @patchelf) --set-rpath %s $(location %s)" % (rpath, so) for rpath, so in zip(_system_rpaths, _system_so_copied)],
+        ),
+        tools = [
+            "@patchelf",
+        ],
+    )
+
+    native.genrule(
+        name = "copy_files" + version,
+        srcs = _src_files,
+        outs = _src_copied,
+        cmd = " && ".join(["cp $(location %s) $(location %s)" % (src, dest) for src, dest in zip(
+            _src_files,
+            _src_copied,
+        )]),
+    )
+
+    if copy_shared_files:
+        native.genrule(
+            name = "create_rc" + version,
+            outs = ["usr/share/matplotlib/mpl-data/matplotlibrc"],
+            cmd = "\n".join([
+                "cat > $@ << END",
+                # This is necessary to make matplotlib actually plot things to the
+                # screen by default.
+                "backend      : TkAgg",
+                "END",
+            ]),
+        )
+
+    native.py_library(
+        name = "matplotlib" + version,
+        srcs = _src_copied + [
+            version + "/matplotlib/__init__.py",
+        ],
+        data = _data_files + _builtin_so_copied + _system_so_copied + [
+            ":usr/share/matplotlib/mpl-data/matplotlibrc",
+        ] + native.glob(["etc/**"]),
+        imports = ["usr/lib/python" + version + "/dist-packages", version, "."],
+        restricted_to = ["@//tools:k8"],
+        visibility = ["//visibility:public"],
+    )
diff --git a/debian/packages.bzl b/debian/packages.bzl
index ba1f840..3043452 100644
--- a/debian/packages.bzl
+++ b/debian/packages.bzl
@@ -55,14 +55,14 @@
     )
 
 def _convert_deb_to_target(deb):
-  """Converts a debian package filename to a valid bazel target name."""
-  target = deb
-  target = target.replace('-', '_')
-  target = target.replace('.', '_')
-  target = target.replace(':', '_')
-  target = target.replace('+', 'x')
-  target = target.replace('~', '_')
-  return "deb_%s_repo" % target
+    """Converts a debian package filename to a valid bazel target name."""
+    target = deb
+    target = target.replace("-", "_")
+    target = target.replace(".", "_")
+    target = target.replace(":", "_")
+    target = target.replace("+", "x")
+    target = target.replace("~", "_")
+    return "deb_%s_repo" % target
 
 def generate_repositories_for_debs(files, base_url = "http://www.frc971.org/Build-Dependencies"):
     """A WORKSPACE helper to add all the deb packages in the dictionary as a repo.