Compare commits
1 Commits
main
...
3-read-all
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b67f2cf13a |
@ -25,7 +25,7 @@ int main(int argc, char* argv[]) {
|
|||||||
extract_value_from_arg(args, ARG_REMOTE));
|
extract_value_from_arg(args, ARG_REMOTE));
|
||||||
LOG_INFO("Project platforms:");
|
LOG_INFO("Project platforms:");
|
||||||
for (size_t i = 0; i < project_platforms->size; i++) {
|
for (size_t i = 0; i < project_platforms->size; i++) {
|
||||||
printf("%s", SUPPORTED_PLATFORM_NAMES[project_platforms->ids[i]]);
|
LOG_INFO("%s", SUPPORTED_PLATFORM_NAMES[project_platforms->ids[i]]);
|
||||||
}
|
}
|
||||||
cdo_free((void*)project_path);
|
cdo_free((void*)project_path);
|
||||||
free_arg_list(args);
|
free_arg_list(args);
|
||||||
|
|||||||
@ -61,19 +61,11 @@ static PlatformIdList* identify_remote_urls(Lines* remote_urls) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PlatformIdList* platforms = cdo_calloc(1, sizeof(PlatformIdList));
|
PlatformIdList* platforms = cdo_calloc(1, sizeof(PlatformIdList));
|
||||||
|
platforms->size = remote_urls->size;
|
||||||
platforms->ids = cdo_malloc(platforms->size * sizeof(PlaformId));
|
platforms->ids = cdo_malloc(platforms->size * sizeof(PlaformId));
|
||||||
|
|
||||||
for(size_t i = 0; i < remote_urls->size; i++) {
|
for(size_t i = 0; i < remote_urls->size; i++) {
|
||||||
platforms->ids[i] = get_platfrom_id_from_string(remote_urls->lines[i]->data);
|
platforms->ids[i] = get_platfrom_id_from_string(remote_urls->lines[i]->data);
|
||||||
if (platforms->ids[i] != PL_UNRECOGNIZED) platforms->size++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (platforms->size == 0) {
|
|
||||||
LOG_ERROR_EXIT(
|
|
||||||
"No recongnized Git hosting platforms found in the project. "
|
|
||||||
"Supported platforms: [%s, %s]",
|
|
||||||
SUPPORTED_PLATFORM_NAMES[PL_GITHUB], SUPPORTED_PLATFORM_NAMES[PL_GITLAB]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return platforms;
|
return platforms;
|
||||||
|
|||||||
5
src/project/files.c
Normal file
5
src/project/files.c
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "files.h"
|
||||||
|
|
||||||
|
Lines* get_ascii_text_files_from_root(const char* root) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
8
src/project/files.h
Normal file
8
src/project/files.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CDO_FILES_H_
|
||||||
|
#define CDO_FILES_H_
|
||||||
|
|
||||||
|
#include "../tools/buffer.h"
|
||||||
|
|
||||||
|
Lines* get_ascii_text_files_from_root(const char* root);
|
||||||
|
|
||||||
|
#endif // CDO_FILES_H_
|
||||||
Loading…
x
Reference in New Issue
Block a user