scai
Version:
> AI-powered CLI tool for commit messages **and** pull request reviews — using local models.
15 lines (14 loc) • 620 B
JavaScript
import path from 'path';
import { IGNORED_EXTENSIONS } from './ignoredExtensions.js';
import { specificFileExceptions } from './fileExceptions.js';
export function shouldIgnoreFile(filePath) {
// Get file extension
const ext = path.extname(filePath).toLowerCase();
// Check if the file is explicitly listed in the exceptions
const fileName = path.basename(filePath);
if (specificFileExceptions.includes(fileName)) {
return false; // Don't ignore if it's in the exceptions list
}
// If not in exceptions, check against ignored extensions
return IGNORED_EXTENSIONS.includes(ext);
}