fix: address review findings — test_scanner cleanup, basename comment
CI / lint (pull_request) Successful in 9s
CI / sanitizers (address) (pull_request) Successful in 15s
CI / sanitizers (undefined) (pull_request) Successful in 15s
CI / coverage (pull_request) Successful in 10s
CI / fuzz-build (pull_request) Successful in 13s
CI / valgrind (pull_request) Successful in 12s
CI / build-and-test (pull_request) Successful in 54s
CI / lint (pull_request) Successful in 9s
CI / sanitizers (address) (pull_request) Successful in 15s
CI / sanitizers (undefined) (pull_request) Successful in 15s
CI / coverage (pull_request) Successful in 10s
CI / fuzz-build (pull_request) Successful in 13s
CI / valgrind (pull_request) Successful in 12s
CI / build-and-test (pull_request) Successful in 54s
This commit is contained in:
@@ -23,6 +23,8 @@ static bool is_excluded(const char* path, const Config* config) {
|
|||||||
char* path_dup = str_dup(path);
|
char* path_dup = str_dup(path);
|
||||||
if (!path_dup)
|
if (!path_dup)
|
||||||
return false;
|
return false;
|
||||||
|
/* basename(3) may return a pointer into path_dup or a static buffer;
|
||||||
|
* either way we free path_dup, not fname. */
|
||||||
char* fname = basename(path_dup);
|
char* fname = basename(path_dup);
|
||||||
|
|
||||||
// Check exclude patterns
|
// Check exclude patterns
|
||||||
|
|||||||
@@ -248,8 +248,6 @@ static void test_scanner_max_size() {
|
|||||||
const char* dir = "test_scan_max";
|
const char* dir = "test_scan_max";
|
||||||
const char* small = "test_scan_max/small.txt";
|
const char* small = "test_scan_max/small.txt";
|
||||||
const char* large = "test_scan_max/large.txt";
|
const char* large = "test_scan_max/large.txt";
|
||||||
create_test_file(small, "tiny");
|
|
||||||
create_test_file(large, "this_content_is_longer_than_ten_chars");
|
|
||||||
|
|
||||||
mkdir(dir, 0755);
|
mkdir(dir, 0755);
|
||||||
create_test_file(small, "tiny");
|
create_test_file(small, "tiny");
|
||||||
|
|||||||
Reference in New Issue
Block a user