mirror of
https://github.com/github/codeql-action.git
synced 2026-05-17 08:40:16 +00:00
Improve paths config handling for JS/Python when globs are used
This commit is contained in:
Generated
+4
-4
@@ -87,9 +87,9 @@ const util = __importStar(require("./util"));
|
||||
trapCacheDownloadTime: 0,
|
||||
};
|
||||
analysisPaths.includeAndExcludeAnalysisPaths(config);
|
||||
t.is(process.env["LGTM_INDEX_INCLUDE"], "path1\npath2");
|
||||
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
|
||||
t.is(process.env["LGTM_INDEX_EXCLUDE"], "path4\npath5");
|
||||
t.is(process.env["LGTM_INDEX_FILTERS"], "include:path1\ninclude:path2\ninclude:**/path3\nexclude:path4\nexclude:path5\nexclude:path6/**");
|
||||
t.is(process.env["LGTM_INDEX_FILTERS"], "exclude:**/*\ninclude:path1\ninclude:path2\ninclude:**/path3\nexclude:path4\nexclude:path5\nexclude:path6/**");
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("paths only has globs", async (t) => {
|
||||
@@ -117,9 +117,9 @@ const util = __importStar(require("./util"));
|
||||
trapCacheDownloadTime: 0,
|
||||
};
|
||||
analysisPaths.includeAndExcludeAnalysisPaths(config);
|
||||
t.is(process.env["LGTM_INDEX_INCLUDE"], "");
|
||||
t.is(process.env["LGTM_INDEX_INCLUDE"], undefined);
|
||||
t.is(process.env["LGTM_INDEX_EXCLUDE"], undefined);
|
||||
t.is(process.env["LGTM_INDEX_FILTERS"], "include:path1/**\ninclude:**/path2");
|
||||
t.is(process.env["LGTM_INDEX_FILTERS"], "exclude:**/*\ninclude:path1/**\ninclude:**/path2");
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("exclude temp dir", async (t) => {
|
||||
|
||||
Reference in New Issue
Block a user