Process a single regular file entry during directory walk. */
| 634 | |
| 635 | /* Process a single regular file entry during directory walk. */ |
| 636 | static void walk_dir_process_file(const char *abs_path, const char *rel_path, const char *name, |
| 637 | const cbm_discover_opts_t *opts, const cbm_gitignore_t *gitignore, |
| 638 | const cbm_gitignore_t *global_gi, |
| 639 | const cbm_gitignore_t *cbmignore, const cbm_gitignore_t *local_gi, |
| 640 | const char *local_gi_prefix, off_t size, file_list_t *out) { |
| 641 | if (should_skip_file(name, rel_path, opts, gitignore, global_gi, cbmignore, local_gi, |
| 642 | local_gi_prefix, size)) { |
| 643 | return; |
| 644 | } |
| 645 | CBMLanguage lang = detect_file_language(name, abs_path); |
| 646 | if (lang == CBM_LANG_COUNT) { |
| 647 | return; |
| 648 | } |
| 649 | fl_add(out, abs_path, rel_path, lang, size); |
| 650 | } |
| 651 | |
| 652 | typedef struct { |
| 653 | char dir[CBM_SZ_4K]; |
no test coverage detected