mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-01 17:02:29 -07:00
Add support for an additional exclusion file besides .gitignore and .geminiignore (#16487)
Co-authored-by: Adam Weidman <adamfweidman@google.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import * as path from 'node:path';
|
||||
import * as os from 'node:os';
|
||||
import { bfsFileSearch, bfsFileSearchSync } from './bfsFileSearch.js';
|
||||
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
||||
import { GEMINI_IGNORE_FILE_NAME } from 'src/config/constants.js';
|
||||
|
||||
describe('bfsFileSearch', () => {
|
||||
let testRootDir: string;
|
||||
@@ -131,6 +132,7 @@ describe('bfsFileSearch', () => {
|
||||
fileFilteringOptions: {
|
||||
respectGitIgnore: true,
|
||||
respectGeminiIgnore: true,
|
||||
customIgnoreFilePaths: [],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -138,7 +140,7 @@ describe('bfsFileSearch', () => {
|
||||
});
|
||||
|
||||
it('should ignore geminiignored files', async () => {
|
||||
await createTestFile('node_modules/', 'project', '.geminiignore');
|
||||
await createTestFile('node_modules/', 'project', GEMINI_IGNORE_FILE_NAME);
|
||||
await createTestFile('content', 'project', 'node_modules', 'target.txt');
|
||||
const targetFilePath = await createTestFile(
|
||||
'content',
|
||||
@@ -154,6 +156,7 @@ describe('bfsFileSearch', () => {
|
||||
fileFilteringOptions: {
|
||||
respectGitIgnore: false,
|
||||
respectGeminiIgnore: true,
|
||||
customIgnoreFilePaths: [],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -183,6 +186,7 @@ describe('bfsFileSearch', () => {
|
||||
fileFilteringOptions: {
|
||||
respectGitIgnore: false,
|
||||
respectGeminiIgnore: false,
|
||||
customIgnoreFilePaths: [],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -316,6 +320,7 @@ describe('bfsFileSearchSync', () => {
|
||||
fileFilteringOptions: {
|
||||
respectGitIgnore: true,
|
||||
respectGeminiIgnore: true,
|
||||
customIgnoreFilePaths: [],
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user