mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Add sys/lint.sh and run it in the CI ##refactor
This commit is contained in:
parent
795a274b48
commit
e69645a9c2
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -44,6 +44,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Linting
|
||||
run: sys/lint.sh
|
||||
- name: Building without capstone
|
||||
run: |
|
||||
cp -f dist/plugins-cfg/plugins.nocs.cfg plugins.cfg
|
||||
|
@ -5533,7 +5533,8 @@ R_API int r_core_print_disasm(RCore *core, ut64 addr, ut8 *buf, int len, int cou
|
||||
if (p) {
|
||||
core->asmqjmps_size = R_CORE_ASMQJMPS_NUM;
|
||||
core->asmqjmps = p;
|
||||
for (int i = 0; i < R_CORE_ASMQJMPS_NUM; i++) {
|
||||
int i;
|
||||
for (i = 0; i < R_CORE_ASMQJMPS_NUM; i++) {
|
||||
core->asmqjmps[i] = UT64_MAX;
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,8 @@ R_API int r_main_ravc2(int argc, const char **argv) {
|
||||
if (message) {
|
||||
RList *files = r_list_new();
|
||||
if (files) {
|
||||
for (size_t i = 2; i < argc - 1; i++) {
|
||||
size_t i;
|
||||
for (i = 2; i < argc - 1; i++) {
|
||||
char *file = r_str_new(argv[opt.ind + i]);
|
||||
if (!file || !r_list_append (files, file)) {
|
||||
free (message);
|
||||
|
9
sys/lint.sh
Executable file
9
sys/lint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
(git grep 'for (int' | grep -v sys/) && exit 1
|
||||
(git grep 'for (long' | grep -v sys/) && exit 1
|
||||
(git grep 'for (size_t' | grep -v sys/) && exit 1
|
||||
|
||||
(git grep 'R_LOG_' | grep '\\n' | grep -v sys/) ## && exit 1
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user