UNPKG

@sun-asterisk/sunlint

Version:

☀️ SunLint - Multi-language static analysis tool for code quality and security | Sun* Engineering Standards

55 lines (48 loc) 1.23 kB
/** * C003 Dart Analyzer - No Vague Abbreviations * * This is a JS wrapper that delegates to DartAnalyzer binary. * Actual implementation: dart_analyzer/lib/rules/vague_abbreviations_analyzer.dart * * Rule: Clear variable names, avoid arbitrary abbreviations */ class DartC003Analyzer { constructor() { this.ruleId = 'C003'; this.language = 'dart'; } /** * Get rule metadata */ getMetadata() { return { ruleId: 'C003', name: 'No Vague Abbreviations', language: 'dart', delegateTo: 'dart_analyzer', description: 'Ensure clear variable names without arbitrary abbreviations' }; } /** * Get default configuration */ getConfig() { return { minLength: 2, allowedSingleChar: ['i', 'j', 'k', 'x', 'y', 'z', 'e', '_'], allowedAbbreviations: ['id', 'url', 'api', 'io', 'db', 'ui', 'ok'], severity: 'warning' }; } /** * Analysis is delegated to DartAnalyzer via heuristic-engine.js */ async analyze(files, language, options) { // Delegated to DartAnalyzer binary via heuristic-engine.js return []; } supportsLanguage(language) { return language === 'dart'; } } module.exports = DartC003Analyzer;