UNPKG

scai

Version:

> **AI-powered CLI for local code analysis, commit message suggestions, and natural-language queries.** 100% local, private, GDPR-friendly, made in Denmark/EU with ❤️.

15 lines (14 loc) 620 B
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); }