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));
|
||||
LOG_INFO("Project platforms:");
|
||||
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);
|
||||
free_arg_list(args);
|
||||
|
||||
@ -61,21 +61,13 @@ static PlatformIdList* identify_remote_urls(Lines* remote_urls) {
|
||||
}
|
||||
|
||||
PlatformIdList* platforms = cdo_calloc(1, sizeof(PlatformIdList));
|
||||
platforms->size = remote_urls->size;
|
||||
platforms->ids = cdo_malloc(platforms->size * sizeof(PlaformId));
|
||||
|
||||
for(size_t i = 0; i < remote_urls->size; i++) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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