-
Notifications
You must be signed in to change notification settings - Fork 17
scripts: support local check for developers #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
scripts/tidy.sh
Outdated
fi ; | ||
done | ||
|
||
wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -O run-clang-tidy.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we cache result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Menooker
I'm not sure it is ok to place code from llvm in our public repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kurapov-peter @ZhennanQin What do you think if we copy .clang-tidy
to our repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not download if already exists:
[ -f run-clang-tidy.py ] || wget ...
[ -f .clang-tidy ] || wget ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kurapov-peter @ZhennanQin What do you think if we copy
.clang-tidy
to our repo?
sure, @leshikus please take a look
scripts/tidy.sh
Outdated
done | ||
|
||
wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -O run-clang-tidy.py | ||
wget https://raw.githubusercontent.com/llvm/llvm-project/main/mlir/.clang-tidy -O .clang-tidy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can copy this file to our repo? Just like .clang_format
?
scripts/tidy.sh
Outdated
fi ; | ||
done | ||
|
||
wget https://raw.githubusercontent.com/llvm/llvm-project/main/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -O run-clang-tidy.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not download if already exists:
[ -f run-clang-tidy.py ] || wget ...
[ -f .clang-tidy ] || wget ...
0312f51
to
5674ca0
Compare
5674ca0
to
9ff54ca
Compare
9ff54ca
to
04275ba
Compare
scripts/full_check.sh
Outdated
|
||
for f in $(find ./include -name Makefile); do | ||
targets=$(make -f $f help |grep IncGen); | ||
if [[ $? -eq 0 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ $? -eq 0 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bash if
command checks the command exit code by default, the code above is like the check if mybool == true
please use either if cmd
or cmd && some_command
@@ -0,0 +1,111 @@ | |||
#! /bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#! /bin/bash | |
#! /bin/bash | |
set -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's usually better to use explicit set -e
in case someone uses bash script
to launch the script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about set -e
? I think, it's very useful for error checking.
scripts/full_check.sh
Outdated
-DLLVM_EXTERNAL_LIT=$(which lit) | ||
|
||
for f in $(find ./include -name Makefile); do | ||
targets=$(make -f $f help |grep IncGen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targets=$(make -f $f help |grep IncGen); | |
if targets=$(make -f $f help |grep IncGen); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
support #20