* Fix lint issues
- Move the doc string into the `doc` attributes on the rule/attr calls.
- Move the print() below the load() statements.
* Also run buildifier in --lint=fix mode to catch issues on Travis.
Buildifier 0.12.0 includes initial support for reformatting .bzl files.
- Reformat all the bzl files.
- Expand the travis check to check the .bzl files also.
Even though it's not great to use type checks, they are frequently useful for
checking input types of macros.
Because there is no standard way of checking types, at least 2 types of checks
are used:
- `type(foo) == type([])`
- `type(foo) == "list"`
The first option is not very readable and the second option seem to be relying
on an Bazel implementation detail. Encapsulating type checks into this library
enables consistent and easy to understand type checking without explicitly
relying on implementation details.
* Fix up the skylint warning about depset usage.
* Remove the reassignment of max_bazel_version.
This was flagged by skylint, the reality is _is_at_most() does the parsing
so it shouldn't be parsed before sent on the way.
* Fix up the skylint warning about depset usage.
* Fixup the skylint warning about re-exports.
Just move to the explicit re-export form.
* Fix the fail() call to use the right variable.
skylint flagged this variable as undefined, but it it seems like this
was never right and should have been "key" all along.
* Fixup docstring formatting for skylint.
This version is hash-based (implemented on top of a dictionary) and doesn't suffer the performance problems of the current version. It will eventually replace the old one after a deprecation period.