/** * Sparrow - Globstar-compatible static analysis tool for Node.js * * A backward-compatible reimplementation of the MIT-licensed Globstar.dev SAST tool. * Original Globstar: https://github.com/DeepSourceCorp/globstar * * Main entry point and public API * * @license MIT */ export { Severity, Category, Language, Issue, IssueJson, Analyzer, Pass, ParseResult, YamlAnalyzer, YamlCheckerDefinition, Config, FailureConfig, TestResult, SkipComment, isValidSeverity, isValidCategory, DEFAULT_IGNORE_DIRS, } from './analysis/types.js'; export { decodeLanguage, getLanguageFromPath, getExtensionFromLanguage, getCommentIdentifier, getCommentPrefix, ensureGrammarLoaded, preloadGrammars, } from './analysis/language.js'; export { parseFile, parseSource, tryParseFile, canParseFile, UnsupportedLanguageError, ParseError, walkTree, walkTreeWithCallbacks, childrenWithFieldName, childWithFieldName, childrenOfType, firstChildOfType, findMatchingChild, findAllNodes, getNodeText, } from './analysis/parser.js'; export { loadYamlChecker, parseYamlChecker, compileYamlChecker, loadYamlCheckers, getAnalyzersFromYaml, YamlCheckerError, } from './analysis/yaml-checker.js'; export { createIssue, createIssueFromPosition, issueToJson, issueAsJson, issueAsText, issueFromJson, reportIssues, reportIssuesAsJson, reportIssuesAsText, filterBySeverity, filterByCategory, filterByCheckerId, excludeByCheckerId, sortIssues, deduplicateIssues, } from './analysis/issue.js'; export { gatherSkipInfo, shouldSkipIssue, filterSkippedIssues, hasSkipcqComment, parseSkipcqComment, createSkipcqComment, } from './analysis/skip-comments.js'; export { runAnalyzers, runAnalyzersOnFile, runAnalyzersOnSource, preorder } from './analysis/analyzer.js'; export { loadConfig, loadConfigFromDir, createDefaultConfig, validateConfig, shouldExcludePath, shouldRunChecker, addExcludePatterns, mergeConfigs, shouldFail, getExitCode, } from './config/config.js'; export { loadBuiltinYamlCheckers, loadCustomYamlCheckers, loadAllCheckers, loadCheckersForLanguage, initializeRegistry, getRegistry, getAnalyzerByName, getAllAnalyzers, getAnalyzersByLanguage, } from './checkers/loader.js'; export { runYamlTests, runAnalyzerTests, findYamlTestFiles, findExpectedLines, findNoErrorLines, formatTestResults, } from './test-runner/runner.js'; import { Issue, TestResult, Language } from './analysis/types.js'; /** * Options for the scan function */ export interface ScanOptions { /** Directory containing custom checkers (default: .globstar or .sparrow) */ checkerDir?: string; /** Path to configuration file */ configPath?: string; /** Use built-in checkers (default: true) */ useBuiltinCheckers?: boolean; /** Specific checkers to enable (overrides config) */ enabledCheckers?: string[]; /** Specific checkers to disable (overrides config) */ disabledCheckers?: string[]; /** Additional exclude patterns */ excludePatterns?: string[]; /** Specific languages to analyze */ languages?: Language[]; /** Output format */ outputFormat?: 'json' | 'text'; } /** * Scan a path for issues using configured checkers */ export declare function scan(targetPath: string, options?: ScanOptions): Promise; /** * Format scan results for output */ export declare function formatResults(issues: Issue[], format?: 'json' | 'text'): string; /** * Run checker tests in a directory */ export declare function runTests(testDir: string): Promise; /** * Initialize Sparrow with a checker directory */ export declare function initialize(options?: { checkerDir?: string; }): Promise; /** * Quick scan with default settings */ export declare function quickScan(targetPath: string): Promise; export declare const VERSION = "1.0.0"; //# sourceMappingURL=index.d.ts.map