Idea for CodeChecker toolchain#226
Conversation
17263c7 to
d51ce3b
Compare
d51ce3b to
baaa57a
Compare
1007067 to
2f2f858
Compare
nettle
left a comment
There was a problem hiding this comment.
Good start! I think this is right way forward!
| fields = [ | ||
| "executable", | ||
| ], |
There was a problem hiding this comment.
Tip: I think this should be a dict
| """ | ||
|
|
||
| CodeCheckerInfo = provider( | ||
| doc = "This provider provides the executable path for CodeChecker", |
There was a problem hiding this comment.
I guess we should list all parameters including clang, clang-tidy and maybe more
| codechecker_toolchain = rule( | ||
| implementation = _codechecker_toolchain_impl, | ||
| attrs = { | ||
| "analyzer_binary": attr.string(), |
There was a problem hiding this comment.
I guess "analyzer" is not a good name here
| content = "\n".join(ctx.attr.skip), | ||
| ) | ||
|
|
||
| info = ctx.toolchains["//src:toolchain_type"].codecheckerinfo |
There was a problem hiding this comment.
Yes, we discussed that to get rid of "src" you may try alias. (I havent tried myself though :) )
|
|
||
| codechecker_toolchain( | ||
| name = "codechecker_local", | ||
| analyzer_binary = "CodeChecker", # Find it in PATH ? |
There was a problem hiding this comment.
We should find a way how to make it flexible. At least we should be able to pass CodeChecker binary by absolute path, try to find in the PATH (current implementation), as a Label, maybe via env var, maybe somehow else...
Why:
We want to use toolchains to determine which CodeChecker binary to use.
What:
use_default_shell_env)Addresses:
none?
Notes:
//codechecker:toolchain_typeinstead of//src:toolchain_type.