erenon / bazel_clang_tidy

Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
MIT License
109 stars 58 forks source link

Don't recommend using `git_repository` #17

Open alexeagle opened 2 years ago

alexeagle commented 2 years ago

Bazel can't cache the fetch, as documented:

https://bazel.build/docs/external

Prefer http_archive to git_repository and new_git_repository. The reasons are: ... http_archive works with the repository cache, but not git_repository. See #5116 for more information.

aminya commented 2 years ago

It can be fixed with this:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_clang_tidy",
    sha256 = "5a3649ac61413f279310058d90124ecb7c52c5ffb5749d9db10244ffd43225f6",
    strip_prefix = "bazel_clang_tidy-32919e10d57fce09eb714936ba6155aee9a73150",
    url = "https://github.com/dayfoo/bazel_clang_tidy/archive/32919e10d57fce09eb714936ba6155aee9a73150.tar.gz",
)
igormcoelho commented 1 year ago

Perhaps some link to this repo is better (since the Issue is from here): https://github.com/erenon/bazel_clang_tidy/archive/31d62bf825a94468b3d35c5ffd4e014e1c0ff566.tar.gz