Commit Graph

3 Commits

Author SHA1 Message Date
Claudio Bley
823c3eb34a
Use POSIX compliant check for DADE_NO_PRE_COMMIT (#15827)
It did not work when using an old Bash version:
```
./.envrc: line 8: [: -v: unary operator expected
```
2022-12-07 22:10:18 +01:00
Claudio Bley
ca1453ee8c
Add pre-commit config and install hook in dev-env (#15637)
* Add `pre-commit` tool to dev-env

* Add pre-commit configuration

Fixes #15522

* Install pre-commit hooks inside the nix shell

* Limit buildifier hook to files to be comitted

The `:buildifier-fix` tool always runs on all Bazel files (by calling `find`),
which is not useful when using pre-commit.

* Install pre-commit hook only when `DADE_NO_PRE_COMMIT` is unset

Since direnv does not execute the shellHook, install in `.envrc` too.
2022-12-07 13:09:50 +00:00
Samir Talwar
e32856ecf4
dev-env: Use nix-shell for scripts instead of sourcing dade-common. (#10088)
* Introduce shell.nix to expose the Nix tooling, if required.

* dev-env: Rewrite the ghcide script to use nix-shell.

* language-support/hs: Use `nix-shell` for export-package.sh.

* Nix: Add a shebang to the Bazel wrapper script.

CHANGELOG_BEGIN
CHANGELOG_END

* dev-env: Standardize the `set` header in `ghcide`.
2021-06-23 09:39:00 +00:00