driftdetect-core 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boundaries/types.d.ts +1 -1
- package/dist/boundaries/types.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -1
- package/dist/call-graph/analysis/graph-builder.js +1 -0
- package/dist/call-graph/analysis/graph-builder.js.map +1 -1
- package/dist/call-graph/extractors/go-data-access-extractor.d.ts +80 -0
- package/dist/call-graph/extractors/go-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-data-access-extractor.js +457 -0
- package/dist/call-graph/extractors/go-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/go-extractor.d.ts +103 -0
- package/dist/call-graph/extractors/go-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-extractor.js +509 -0
- package/dist/call-graph/extractors/go-extractor.js.map +1 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.d.ts +97 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.js +496 -0
- package/dist/call-graph/extractors/go-hybrid-extractor.js.map +1 -0
- package/dist/call-graph/extractors/regex/go-regex.d.ts +51 -0
- package/dist/call-graph/extractors/regex/go-regex.d.ts.map +1 -0
- package/dist/call-graph/extractors/regex/go-regex.js +435 -0
- package/dist/call-graph/extractors/regex/go-regex.js.map +1 -0
- package/dist/call-graph/extractors/regex/index.d.ts +1 -0
- package/dist/call-graph/extractors/regex/index.d.ts.map +1 -1
- package/dist/call-graph/extractors/regex/index.js +8 -0
- package/dist/call-graph/extractors/regex/index.js.map +1 -1
- package/dist/call-graph/index.d.ts +3 -0
- package/dist/call-graph/index.d.ts.map +1 -1
- package/dist/call-graph/index.js +5 -0
- package/dist/call-graph/index.js.map +1 -1
- package/dist/call-graph/types.d.ts +1 -1
- package/dist/call-graph/types.d.ts.map +1 -1
- package/dist/constraints/extraction/constraint-synthesizer.d.ts +72 -0
- package/dist/constraints/extraction/constraint-synthesizer.d.ts.map +1 -0
- package/dist/constraints/extraction/constraint-synthesizer.js +336 -0
- package/dist/constraints/extraction/constraint-synthesizer.js.map +1 -0
- package/dist/constraints/extraction/index.d.ts +10 -0
- package/dist/constraints/extraction/index.d.ts.map +1 -0
- package/dist/constraints/extraction/index.js +10 -0
- package/dist/constraints/extraction/index.js.map +1 -0
- package/dist/constraints/extraction/invariant-detector.d.ts +109 -0
- package/dist/constraints/extraction/invariant-detector.d.ts.map +1 -0
- package/dist/constraints/extraction/invariant-detector.js +979 -0
- package/dist/constraints/extraction/invariant-detector.js.map +1 -0
- package/dist/constraints/index.d.ts +15 -0
- package/dist/constraints/index.d.ts.map +1 -0
- package/dist/constraints/index.js +16 -0
- package/dist/constraints/index.js.map +1 -0
- package/dist/constraints/store/constraint-store.d.ts +110 -0
- package/dist/constraints/store/constraint-store.d.ts.map +1 -0
- package/dist/constraints/store/constraint-store.js +584 -0
- package/dist/constraints/store/constraint-store.js.map +1 -0
- package/dist/constraints/types.d.ts +605 -0
- package/dist/constraints/types.d.ts.map +1 -0
- package/dist/constraints/types.js +57 -0
- package/dist/constraints/types.js.map +1 -0
- package/dist/constraints/verification/constraint-verifier.d.ts +100 -0
- package/dist/constraints/verification/constraint-verifier.d.ts.map +1 -0
- package/dist/constraints/verification/constraint-verifier.js +638 -0
- package/dist/constraints/verification/constraint-verifier.js.map +1 -0
- package/dist/constraints/verification/index.d.ts +8 -0
- package/dist/constraints/verification/index.d.ts.map +1 -0
- package/dist/constraints/verification/index.js +8 -0
- package/dist/constraints/verification/index.js.map +1 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.d.ts +121 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.d.ts.map +1 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.js +904 -0
- package/dist/decisions/analyzer/decision-mining-analyzer.js.map +1 -0
- package/dist/decisions/analyzer/index.d.ts +5 -0
- package/dist/decisions/analyzer/index.d.ts.map +1 -0
- package/dist/decisions/analyzer/index.js +5 -0
- package/dist/decisions/analyzer/index.js.map +1 -0
- package/dist/decisions/extractors/base-commit-extractor.d.ts +104 -0
- package/dist/decisions/extractors/base-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/base-commit-extractor.js +305 -0
- package/dist/decisions/extractors/base-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/csharp-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/csharp-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/csharp-commit-extractor.js +281 -0
- package/dist/decisions/extractors/csharp-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/index.d.ts +31 -0
- package/dist/decisions/extractors/index.d.ts.map +1 -0
- package/dist/decisions/extractors/index.js +63 -0
- package/dist/decisions/extractors/index.js.map +1 -0
- package/dist/decisions/extractors/java-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/java-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/java-commit-extractor.js +248 -0
- package/dist/decisions/extractors/java-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/php-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/php-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/php-commit-extractor.js +280 -0
- package/dist/decisions/extractors/php-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/python-commit-extractor.d.ts +18 -0
- package/dist/decisions/extractors/python-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/python-commit-extractor.js +248 -0
- package/dist/decisions/extractors/python-commit-extractor.js.map +1 -0
- package/dist/decisions/extractors/typescript-commit-extractor.d.ts +37 -0
- package/dist/decisions/extractors/typescript-commit-extractor.d.ts.map +1 -0
- package/dist/decisions/extractors/typescript-commit-extractor.js +229 -0
- package/dist/decisions/extractors/typescript-commit-extractor.js.map +1 -0
- package/dist/decisions/git/commit-parser.d.ts +58 -0
- package/dist/decisions/git/commit-parser.d.ts.map +1 -0
- package/dist/decisions/git/commit-parser.js +344 -0
- package/dist/decisions/git/commit-parser.js.map +1 -0
- package/dist/decisions/git/diff-analyzer.d.ts +30 -0
- package/dist/decisions/git/diff-analyzer.d.ts.map +1 -0
- package/dist/decisions/git/diff-analyzer.js +492 -0
- package/dist/decisions/git/diff-analyzer.js.map +1 -0
- package/dist/decisions/git/git-walker.d.ts +64 -0
- package/dist/decisions/git/git-walker.d.ts.map +1 -0
- package/dist/decisions/git/git-walker.js +441 -0
- package/dist/decisions/git/git-walker.js.map +1 -0
- package/dist/decisions/git/index.d.ts +11 -0
- package/dist/decisions/git/index.d.ts.map +1 -0
- package/dist/decisions/git/index.js +13 -0
- package/dist/decisions/git/index.js.map +1 -0
- package/dist/decisions/git/types.d.ts +223 -0
- package/dist/decisions/git/types.d.ts.map +1 -0
- package/dist/decisions/git/types.js +7 -0
- package/dist/decisions/git/types.js.map +1 -0
- package/dist/decisions/index.d.ts +27 -0
- package/dist/decisions/index.d.ts.map +1 -0
- package/dist/decisions/index.js +45 -0
- package/dist/decisions/index.js.map +1 -0
- package/dist/decisions/types.d.ts +530 -0
- package/dist/decisions/types.d.ts.map +1 -0
- package/dist/decisions/types.js +8 -0
- package/dist/decisions/types.js.map +1 -0
- package/dist/go/go-analyzer.d.ts +203 -0
- package/dist/go/go-analyzer.d.ts.map +1 -0
- package/dist/go/go-analyzer.js +509 -0
- package/dist/go/go-analyzer.js.map +1 -0
- package/dist/go/index.d.ts +7 -0
- package/dist/go/index.d.ts.map +1 -0
- package/dist/go/index.js +8 -0
- package/dist/go/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -1
- package/dist/parsers/tree-sitter/go-loader.d.ts +50 -0
- package/dist/parsers/tree-sitter/go-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/go-loader.js +161 -0
- package/dist/parsers/tree-sitter/go-loader.js.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts +250 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.js +707 -0
- package/dist/parsers/tree-sitter/tree-sitter-go-parser.js.map +1 -0
- package/dist/parsers/types.d.ts +1 -1
- package/dist/parsers/types.d.ts.map +1 -1
- package/dist/simulation/approach-generator.d.ts +73 -0
- package/dist/simulation/approach-generator.d.ts.map +1 -0
- package/dist/simulation/approach-generator.js +371 -0
- package/dist/simulation/approach-generator.js.map +1 -0
- package/dist/simulation/index.d.ts +14 -0
- package/dist/simulation/index.d.ts.map +1 -0
- package/dist/simulation/index.js +19 -0
- package/dist/simulation/index.js.map +1 -0
- package/dist/simulation/language-strategies/csharp-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/csharp-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/csharp-strategies.js +118 -0
- package/dist/simulation/language-strategies/csharp-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/index.d.ts +41 -0
- package/dist/simulation/language-strategies/index.d.ts.map +1 -0
- package/dist/simulation/language-strategies/index.js +92 -0
- package/dist/simulation/language-strategies/index.js.map +1 -0
- package/dist/simulation/language-strategies/java-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/java-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/java-strategies.js +119 -0
- package/dist/simulation/language-strategies/java-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/php-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/php-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/php-strategies.js +129 -0
- package/dist/simulation/language-strategies/php-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/python-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/python-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/python-strategies.js +208 -0
- package/dist/simulation/language-strategies/python-strategies.js.map +1 -0
- package/dist/simulation/language-strategies/types.d.ts +67 -0
- package/dist/simulation/language-strategies/types.d.ts.map +1 -0
- package/dist/simulation/language-strategies/types.js +23 -0
- package/dist/simulation/language-strategies/types.js.map +1 -0
- package/dist/simulation/language-strategies/typescript-strategies.d.ts +17 -0
- package/dist/simulation/language-strategies/typescript-strategies.d.ts.map +1 -0
- package/dist/simulation/language-strategies/typescript-strategies.js +251 -0
- package/dist/simulation/language-strategies/typescript-strategies.js.map +1 -0
- package/dist/simulation/scorers/friction-scorer.d.ts +45 -0
- package/dist/simulation/scorers/friction-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/friction-scorer.js +336 -0
- package/dist/simulation/scorers/friction-scorer.js.map +1 -0
- package/dist/simulation/scorers/impact-scorer.d.ts +56 -0
- package/dist/simulation/scorers/impact-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/impact-scorer.js +273 -0
- package/dist/simulation/scorers/impact-scorer.js.map +1 -0
- package/dist/simulation/scorers/index.d.ts +12 -0
- package/dist/simulation/scorers/index.d.ts.map +1 -0
- package/dist/simulation/scorers/index.js +12 -0
- package/dist/simulation/scorers/index.js.map +1 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.d.ts +83 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.js +367 -0
- package/dist/simulation/scorers/pattern-alignment-scorer.js.map +1 -0
- package/dist/simulation/scorers/security-scorer.d.ts +63 -0
- package/dist/simulation/scorers/security-scorer.d.ts.map +1 -0
- package/dist/simulation/scorers/security-scorer.js +346 -0
- package/dist/simulation/scorers/security-scorer.js.map +1 -0
- package/dist/simulation/simulation-engine.d.ts +89 -0
- package/dist/simulation/simulation-engine.d.ts.map +1 -0
- package/dist/simulation/simulation-engine.js +480 -0
- package/dist/simulation/simulation-engine.js.map +1 -0
- package/dist/simulation/types.d.ts +200 -0
- package/dist/simulation/types.d.ts.map +1 -0
- package/dist/simulation/types.js +23 -0
- package/dist/simulation/types.js.map +1 -0
- package/dist/speculative/approach-generator.d.ts +2 -0
- package/dist/speculative/approach-generator.d.ts.map +1 -0
- package/dist/speculative/approach-generator.js +2 -0
- package/dist/speculative/approach-generator.js.map +1 -0
- package/dist/speculative/templates/types.d.ts +133 -0
- package/dist/speculative/templates/types.d.ts.map +1 -0
- package/dist/speculative/templates/types.js +208 -0
- package/dist/speculative/templates/types.js.map +1 -0
- package/dist/speculative/types.d.ts +523 -0
- package/dist/speculative/types.d.ts.map +1 -0
- package/dist/speculative/types.js +71 -0
- package/dist/speculative/types.js.map +1 -0
- package/dist/test-topology/extractors/base-test-extractor.d.ts +1 -1
- package/dist/test-topology/extractors/base-test-extractor.d.ts.map +1 -1
- package/dist/test-topology/extractors/base-test-extractor.js.map +1 -1
- package/dist/test-topology/extractors/go-test-extractor.d.ts +33 -0
- package/dist/test-topology/extractors/go-test-extractor.d.ts.map +1 -0
- package/dist/test-topology/extractors/go-test-extractor.js +436 -0
- package/dist/test-topology/extractors/go-test-extractor.js.map +1 -0
- package/dist/test-topology/extractors/index.d.ts +1 -0
- package/dist/test-topology/extractors/index.d.ts.map +1 -1
- package/dist/test-topology/extractors/index.js +1 -0
- package/dist/test-topology/extractors/index.js.map +1 -1
- package/dist/test-topology/extractors/regex/go-test-regex.d.ts +62 -0
- package/dist/test-topology/extractors/regex/go-test-regex.d.ts.map +1 -0
- package/dist/test-topology/extractors/regex/go-test-regex.js +528 -0
- package/dist/test-topology/extractors/regex/go-test-regex.js.map +1 -0
- package/dist/test-topology/extractors/regex/index.d.ts +1 -0
- package/dist/test-topology/extractors/regex/index.d.ts.map +1 -1
- package/dist/test-topology/extractors/regex/index.js +4 -0
- package/dist/test-topology/extractors/regex/index.js.map +1 -1
- package/dist/test-topology/hybrid-test-topology-analyzer.d.ts.map +1 -1
- package/dist/test-topology/hybrid-test-topology-analyzer.js +1 -0
- package/dist/test-topology/hybrid-test-topology-analyzer.js.map +1 -1
- package/dist/test-topology/test-topology-analyzer.d.ts.map +1 -1
- package/dist/test-topology/test-topology-analyzer.js +1 -0
- package/dist/test-topology/test-topology-analyzer.js.map +1 -1
- package/dist/test-topology/types.d.ts +2 -2
- package/dist/test-topology/types.d.ts.map +1 -1
- package/dist/unified-provider/matching/database-sql-matcher.d.ts +42 -0
- package/dist/unified-provider/matching/database-sql-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/database-sql-matcher.js +282 -0
- package/dist/unified-provider/matching/database-sql-matcher.js.map +1 -0
- package/dist/unified-provider/matching/gorm-matcher.d.ts +41 -0
- package/dist/unified-provider/matching/gorm-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/gorm-matcher.js +222 -0
- package/dist/unified-provider/matching/gorm-matcher.js.map +1 -0
- package/dist/unified-provider/matching/index.d.ts +3 -0
- package/dist/unified-provider/matching/index.d.ts.map +1 -1
- package/dist/unified-provider/matching/index.js +4 -0
- package/dist/unified-provider/matching/index.js.map +1 -1
- package/dist/unified-provider/matching/matcher-registry.d.ts.map +1 -1
- package/dist/unified-provider/matching/matcher-registry.js +7 -0
- package/dist/unified-provider/matching/matcher-registry.js.map +1 -1
- package/dist/unified-provider/matching/sqlx-matcher.d.ts +40 -0
- package/dist/unified-provider/matching/sqlx-matcher.d.ts.map +1 -0
- package/dist/unified-provider/matching/sqlx-matcher.js +214 -0
- package/dist/unified-provider/matching/sqlx-matcher.js.map +1 -0
- package/dist/unified-provider/normalization/go-normalizer.d.ts +62 -0
- package/dist/unified-provider/normalization/go-normalizer.d.ts.map +1 -0
- package/dist/unified-provider/normalization/go-normalizer.js +608 -0
- package/dist/unified-provider/normalization/go-normalizer.js.map +1 -0
- package/dist/unified-provider/normalization/index.d.ts +1 -0
- package/dist/unified-provider/normalization/index.d.ts.map +1 -1
- package/dist/unified-provider/normalization/index.js +6 -1
- package/dist/unified-provider/normalization/index.js.map +1 -1
- package/dist/unified-provider/types.d.ts +1 -1
- package/dist/unified-provider/types.d.ts.map +1 -1
- package/dist/wpf/extractors/binding-error-detector.d.ts +75 -0
- package/dist/wpf/extractors/binding-error-detector.d.ts.map +1 -0
- package/dist/wpf/extractors/binding-error-detector.js +290 -0
- package/dist/wpf/extractors/binding-error-detector.js.map +1 -0
- package/dist/wpf/extractors/code-behind-linker.d.ts +70 -0
- package/dist/wpf/extractors/code-behind-linker.d.ts.map +1 -0
- package/dist/wpf/extractors/code-behind-linker.js +172 -0
- package/dist/wpf/extractors/code-behind-linker.js.map +1 -0
- package/dist/wpf/extractors/dependency-property-extractor.d.ts +61 -0
- package/dist/wpf/extractors/dependency-property-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/dependency-property-extractor.js +201 -0
- package/dist/wpf/extractors/dependency-property-extractor.js.map +1 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.d.ts +82 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.d.ts.map +1 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.js +412 -0
- package/dist/wpf/extractors/regex/viewmodel-regex.js.map +1 -0
- package/dist/wpf/extractors/regex/xaml-regex.d.ts +77 -0
- package/dist/wpf/extractors/regex/xaml-regex.d.ts.map +1 -0
- package/dist/wpf/extractors/regex/xaml-regex.js +353 -0
- package/dist/wpf/extractors/regex/xaml-regex.js.map +1 -0
- package/dist/wpf/extractors/resource-dictionary-parser.d.ts +103 -0
- package/dist/wpf/extractors/resource-dictionary-parser.d.ts.map +1 -0
- package/dist/wpf/extractors/resource-dictionary-parser.js +296 -0
- package/dist/wpf/extractors/resource-dictionary-parser.js.map +1 -0
- package/dist/wpf/extractors/value-converter-extractor.d.ts +128 -0
- package/dist/wpf/extractors/value-converter-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/value-converter-extractor.js +312 -0
- package/dist/wpf/extractors/value-converter-extractor.js.map +1 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts +104 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.js +513 -0
- package/dist/wpf/extractors/viewmodel-hybrid-extractor.js.map +1 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts +98 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.d.ts.map +1 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.js +444 -0
- package/dist/wpf/extractors/xaml-hybrid-extractor.js.map +1 -0
- package/dist/wpf/index.d.ts +25 -0
- package/dist/wpf/index.d.ts.map +1 -0
- package/dist/wpf/index.js +31 -0
- package/dist/wpf/index.js.map +1 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.d.ts +82 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.d.ts.map +1 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.js +311 -0
- package/dist/wpf/integration/wpf-callgraph-adapter.js.map +1 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.d.ts +129 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.d.ts.map +1 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.js +367 -0
- package/dist/wpf/integration/wpf-data-flow-tracer.js.map +1 -0
- package/dist/wpf/linkers/datacontext-resolver.d.ts +66 -0
- package/dist/wpf/linkers/datacontext-resolver.d.ts.map +1 -0
- package/dist/wpf/linkers/datacontext-resolver.js +240 -0
- package/dist/wpf/linkers/datacontext-resolver.js.map +1 -0
- package/dist/wpf/linkers/viewmodel-linker.d.ts +71 -0
- package/dist/wpf/linkers/viewmodel-linker.d.ts.map +1 -0
- package/dist/wpf/linkers/viewmodel-linker.js +268 -0
- package/dist/wpf/linkers/viewmodel-linker.js.map +1 -0
- package/dist/wpf/types.d.ts +451 -0
- package/dist/wpf/types.d.ts.map +1 -0
- package/dist/wpf/types.js +8 -0
- package/dist/wpf/types.js.map +1 -0
- package/dist/wpf/wpf-analyzer.d.ts +114 -0
- package/dist/wpf/wpf-analyzer.d.ts.map +1 -0
- package/dist/wpf/wpf-analyzer.js +332 -0
- package/dist/wpf/wpf-analyzer.js.map +1 -0
- package/dist/wrappers/integration/adapter.d.ts.map +1 -1
- package/dist/wrappers/integration/adapter.js +1 -0
- package/dist/wrappers/integration/adapter.js.map +1 -1
- package/package.json +29 -18
- package/LICENSE +0 -21
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go Test Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts test information from Go testing frameworks:
|
|
5
|
+
* - Standard library testing package
|
|
6
|
+
* - testify (assert, require, suite)
|
|
7
|
+
* - ginkgo/gomega
|
|
8
|
+
* - gomock
|
|
9
|
+
*/
|
|
10
|
+
import type Parser from 'tree-sitter';
|
|
11
|
+
import { BaseTestExtractor } from './base-test-extractor.js';
|
|
12
|
+
import type { TestExtraction, TestCase, MockStatement, SetupBlock, TestFramework } from '../types.js';
|
|
13
|
+
export declare class GoTestExtractor extends BaseTestExtractor {
|
|
14
|
+
constructor(parser: Parser);
|
|
15
|
+
extract(content: string, filePath: string): TestExtraction;
|
|
16
|
+
detectFramework(root: Parser.SyntaxNode): TestFramework;
|
|
17
|
+
extractTestCases(root: Parser.SyntaxNode): TestCase[];
|
|
18
|
+
private hasTestingTParam;
|
|
19
|
+
private hasTestingBParam;
|
|
20
|
+
extractMocks(root: Parser.SyntaxNode, _framework: TestFramework): MockStatement[];
|
|
21
|
+
extractSetupBlocks(root: Parser.SyntaxNode): SetupBlock[];
|
|
22
|
+
protected findImports(root: Parser.SyntaxNode): string[];
|
|
23
|
+
private extractAssertions;
|
|
24
|
+
/**
|
|
25
|
+
* Override to add Go-specific test framework calls
|
|
26
|
+
*/
|
|
27
|
+
protected isTestFrameworkCall(name: string): boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create a Go test extractor instance
|
|
31
|
+
*/
|
|
32
|
+
export declare function createGoTestExtractor(parser: Parser): GoTestExtractor;
|
|
33
|
+
//# sourceMappingURL=go-test-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-test-extractor.d.ts","sourceRoot":"","sources":["../../../src/test-topology/extractors/go-test-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,UAAU,EAEV,aAAa,EACd,MAAM,aAAa,CAAC;AAqBrB,qBAAa,eAAgB,SAAQ,iBAAiB;gBACxC,MAAM,EAAE,MAAM;IAI1B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc;IA0B1D,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,aAAa;IAoBvD,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,QAAQ,EAAE;IAsHrD,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,gBAAgB;IAiBxB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,GAAG,aAAa,EAAE;IAyDjF,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,EAAE;IAmEzD,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,EAAE;IAexD,OAAO,CAAC,iBAAiB;IAoEzB;;OAEG;cACgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAiD9D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAErE"}
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go Test Extractor
|
|
3
|
+
*
|
|
4
|
+
* Extracts test information from Go testing frameworks:
|
|
5
|
+
* - Standard library testing package
|
|
6
|
+
* - testify (assert, require, suite)
|
|
7
|
+
* - ginkgo/gomega
|
|
8
|
+
* - gomock
|
|
9
|
+
*/
|
|
10
|
+
import { BaseTestExtractor } from './base-test-extractor.js';
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Framework Detection
|
|
13
|
+
// ============================================================================
|
|
14
|
+
const FRAMEWORK_IMPORTS = {
|
|
15
|
+
testing: 'go-testing',
|
|
16
|
+
'github.com/stretchr/testify': 'testify',
|
|
17
|
+
'github.com/stretchr/testify/assert': 'testify',
|
|
18
|
+
'github.com/stretchr/testify/require': 'testify',
|
|
19
|
+
'github.com/stretchr/testify/suite': 'testify',
|
|
20
|
+
'github.com/onsi/ginkgo': 'ginkgo',
|
|
21
|
+
'github.com/onsi/ginkgo/v2': 'ginkgo',
|
|
22
|
+
'github.com/onsi/gomega': 'gomega',
|
|
23
|
+
};
|
|
24
|
+
// ============================================================================
|
|
25
|
+
// Extractor Implementation
|
|
26
|
+
// ============================================================================
|
|
27
|
+
export class GoTestExtractor extends BaseTestExtractor {
|
|
28
|
+
constructor(parser) {
|
|
29
|
+
super(parser, 'go');
|
|
30
|
+
}
|
|
31
|
+
extract(content, filePath) {
|
|
32
|
+
const tree = this.parser.parse(content);
|
|
33
|
+
const root = tree.rootNode;
|
|
34
|
+
const framework = this.detectFramework(root);
|
|
35
|
+
const testCases = this.extractTestCases(root);
|
|
36
|
+
const mocks = this.extractMocks(root, framework);
|
|
37
|
+
const setupBlocks = this.extractSetupBlocks(root);
|
|
38
|
+
// Enrich test cases with quality
|
|
39
|
+
for (const test of testCases) {
|
|
40
|
+
const testMocks = mocks.filter((m) => m.line >= test.line && m.line <= test.line + 100);
|
|
41
|
+
test.quality = this.calculateQuality(test.assertions, testMocks, test.directCalls);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
file: filePath,
|
|
45
|
+
framework,
|
|
46
|
+
language: 'go',
|
|
47
|
+
testCases,
|
|
48
|
+
mocks,
|
|
49
|
+
setupBlocks,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
detectFramework(root) {
|
|
53
|
+
const imports = this.findImports(root);
|
|
54
|
+
for (const imp of imports) {
|
|
55
|
+
for (const [pattern, framework] of Object.entries(FRAMEWORK_IMPORTS)) {
|
|
56
|
+
if (imp.includes(pattern)) {
|
|
57
|
+
return framework;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// Check for test function patterns
|
|
62
|
+
const text = root.text;
|
|
63
|
+
if (text.includes('func Test') && text.includes('*testing.T')) {
|
|
64
|
+
return 'go-testing';
|
|
65
|
+
}
|
|
66
|
+
return 'unknown';
|
|
67
|
+
}
|
|
68
|
+
extractTestCases(root) {
|
|
69
|
+
const testCases = [];
|
|
70
|
+
this.walkNode(root, (node) => {
|
|
71
|
+
// Find test functions: func TestXxx(t *testing.T)
|
|
72
|
+
if (node.type === 'function_declaration') {
|
|
73
|
+
const nameNode = node.childForFieldName('name');
|
|
74
|
+
const parametersNode = node.childForFieldName('parameters');
|
|
75
|
+
const bodyNode = node.childForFieldName('body');
|
|
76
|
+
if (nameNode && parametersNode && bodyNode) {
|
|
77
|
+
const name = nameNode.text;
|
|
78
|
+
// Check if it's a test function
|
|
79
|
+
if (name.startsWith('Test') && this.hasTestingTParam(parametersNode)) {
|
|
80
|
+
const directCalls = this.extractFunctionCalls(bodyNode);
|
|
81
|
+
const assertions = this.extractAssertions(bodyNode);
|
|
82
|
+
testCases.push({
|
|
83
|
+
id: this.generateTestId('', name, node.startPosition.row),
|
|
84
|
+
name,
|
|
85
|
+
qualifiedName: name,
|
|
86
|
+
file: '',
|
|
87
|
+
line: node.startPosition.row + 1,
|
|
88
|
+
directCalls,
|
|
89
|
+
transitiveCalls: [],
|
|
90
|
+
assertions,
|
|
91
|
+
quality: {
|
|
92
|
+
assertionCount: assertions.length,
|
|
93
|
+
hasErrorCases: false,
|
|
94
|
+
hasEdgeCases: false,
|
|
95
|
+
mockRatio: 0,
|
|
96
|
+
setupRatio: 0,
|
|
97
|
+
score: 50,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// Check for benchmark functions: func BenchmarkXxx(b *testing.B)
|
|
102
|
+
if (name.startsWith('Benchmark') && this.hasTestingBParam(parametersNode)) {
|
|
103
|
+
const directCalls = this.extractFunctionCalls(bodyNode);
|
|
104
|
+
testCases.push({
|
|
105
|
+
id: this.generateTestId('', name, node.startPosition.row),
|
|
106
|
+
name,
|
|
107
|
+
qualifiedName: name,
|
|
108
|
+
file: '',
|
|
109
|
+
line: node.startPosition.row + 1,
|
|
110
|
+
directCalls,
|
|
111
|
+
transitiveCalls: [],
|
|
112
|
+
assertions: [],
|
|
113
|
+
quality: {
|
|
114
|
+
assertionCount: 0,
|
|
115
|
+
hasErrorCases: false,
|
|
116
|
+
hasEdgeCases: false,
|
|
117
|
+
mockRatio: 0,
|
|
118
|
+
setupRatio: 0,
|
|
119
|
+
score: 50,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Find table-driven test cases: t.Run("name", func(t *testing.T) {...})
|
|
126
|
+
if (node.type === 'call_expression') {
|
|
127
|
+
const funcNode = node.childForFieldName('function');
|
|
128
|
+
if (funcNode?.type === 'selector_expression') {
|
|
129
|
+
const fieldNode = funcNode.childForFieldName('field');
|
|
130
|
+
if (fieldNode?.text === 'Run') {
|
|
131
|
+
const argsNode = node.childForFieldName('arguments');
|
|
132
|
+
if (argsNode) {
|
|
133
|
+
const args = argsNode.namedChildren;
|
|
134
|
+
if (args.length >= 2) {
|
|
135
|
+
const nameArg = args[0];
|
|
136
|
+
const funcArg = args[1];
|
|
137
|
+
if (nameArg && funcArg?.type === 'func_literal') {
|
|
138
|
+
const testName = nameArg.text.replace(/^"|"$/g, '');
|
|
139
|
+
const bodyNode = funcArg.childForFieldName('body');
|
|
140
|
+
if (bodyNode) {
|
|
141
|
+
const directCalls = this.extractFunctionCalls(bodyNode);
|
|
142
|
+
const assertions = this.extractAssertions(bodyNode);
|
|
143
|
+
testCases.push({
|
|
144
|
+
id: this.generateTestId('', testName, node.startPosition.row),
|
|
145
|
+
name: testName,
|
|
146
|
+
qualifiedName: testName,
|
|
147
|
+
file: '',
|
|
148
|
+
line: node.startPosition.row + 1,
|
|
149
|
+
directCalls,
|
|
150
|
+
transitiveCalls: [],
|
|
151
|
+
assertions,
|
|
152
|
+
quality: {
|
|
153
|
+
assertionCount: assertions.length,
|
|
154
|
+
hasErrorCases: false,
|
|
155
|
+
hasEdgeCases: false,
|
|
156
|
+
mockRatio: 0,
|
|
157
|
+
setupRatio: 0,
|
|
158
|
+
score: 50,
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
return testCases;
|
|
170
|
+
}
|
|
171
|
+
hasTestingTParam(parametersNode) {
|
|
172
|
+
for (const child of parametersNode.children) {
|
|
173
|
+
if (child.type === 'parameter_declaration') {
|
|
174
|
+
const typeNode = child.childForFieldName('type');
|
|
175
|
+
if (typeNode?.text.includes('testing.T')) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
// Also check children for pointer types
|
|
179
|
+
for (const typeChild of child.children) {
|
|
180
|
+
if (typeChild.text.includes('testing.T')) {
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
hasTestingBParam(parametersNode) {
|
|
189
|
+
for (const child of parametersNode.children) {
|
|
190
|
+
if (child.type === 'parameter_declaration') {
|
|
191
|
+
const typeNode = child.childForFieldName('type');
|
|
192
|
+
if (typeNode?.text.includes('testing.B')) {
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
for (const typeChild of child.children) {
|
|
196
|
+
if (typeChild.text.includes('testing.B')) {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
extractMocks(root, _framework) {
|
|
205
|
+
const mocks = [];
|
|
206
|
+
this.walkNode(root, (node) => {
|
|
207
|
+
// gomock: ctrl.EXPECT().Method().Return(...)
|
|
208
|
+
if (node.type === 'call_expression') {
|
|
209
|
+
const funcNode = node.childForFieldName('function');
|
|
210
|
+
if (funcNode?.type === 'selector_expression') {
|
|
211
|
+
const fieldNode = funcNode.childForFieldName('field');
|
|
212
|
+
if (fieldNode?.text === 'EXPECT') {
|
|
213
|
+
mocks.push({
|
|
214
|
+
target: funcNode.text,
|
|
215
|
+
mockType: 'gomock',
|
|
216
|
+
line: node.startPosition.row + 1,
|
|
217
|
+
isExternal: false,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// testify mock: mock.On("Method", args).Return(...)
|
|
223
|
+
if (node.type === 'call_expression') {
|
|
224
|
+
const funcNode = node.childForFieldName('function');
|
|
225
|
+
if (funcNode?.type === 'selector_expression') {
|
|
226
|
+
const fieldNode = funcNode.childForFieldName('field');
|
|
227
|
+
if (fieldNode?.text === 'On') {
|
|
228
|
+
mocks.push({
|
|
229
|
+
target: funcNode.text,
|
|
230
|
+
mockType: 'testify-mock',
|
|
231
|
+
line: node.startPosition.row + 1,
|
|
232
|
+
isExternal: false,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
// gomock.NewController
|
|
238
|
+
if (node.type === 'call_expression') {
|
|
239
|
+
const funcNode = node.childForFieldName('function');
|
|
240
|
+
if (funcNode?.text.includes('NewController')) {
|
|
241
|
+
mocks.push({
|
|
242
|
+
target: 'gomock.Controller',
|
|
243
|
+
mockType: 'gomock',
|
|
244
|
+
line: node.startPosition.row + 1,
|
|
245
|
+
isExternal: true,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
return mocks;
|
|
251
|
+
}
|
|
252
|
+
extractSetupBlocks(root) {
|
|
253
|
+
const blocks = [];
|
|
254
|
+
this.walkNode(root, (node) => {
|
|
255
|
+
// Find TestMain function
|
|
256
|
+
if (node.type === 'function_declaration') {
|
|
257
|
+
const nameNode = node.childForFieldName('name');
|
|
258
|
+
const bodyNode = node.childForFieldName('body');
|
|
259
|
+
if (nameNode?.text === 'TestMain' && bodyNode) {
|
|
260
|
+
const calls = this.extractFunctionCalls(bodyNode);
|
|
261
|
+
blocks.push({
|
|
262
|
+
type: 'beforeAll',
|
|
263
|
+
line: node.startPosition.row + 1,
|
|
264
|
+
calls,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
// Find t.Cleanup() calls
|
|
269
|
+
if (node.type === 'call_expression') {
|
|
270
|
+
const funcNode = node.childForFieldName('function');
|
|
271
|
+
if (funcNode?.type === 'selector_expression') {
|
|
272
|
+
const fieldNode = funcNode.childForFieldName('field');
|
|
273
|
+
if (fieldNode?.text === 'Cleanup') {
|
|
274
|
+
blocks.push({
|
|
275
|
+
type: 'afterEach',
|
|
276
|
+
line: node.startPosition.row + 1,
|
|
277
|
+
calls: [],
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
// Find suite setup methods (testify/suite)
|
|
283
|
+
if (node.type === 'method_declaration') {
|
|
284
|
+
const nameNode = node.childForFieldName('name');
|
|
285
|
+
const bodyNode = node.childForFieldName('body');
|
|
286
|
+
if (nameNode && bodyNode) {
|
|
287
|
+
const name = nameNode.text;
|
|
288
|
+
if (name === 'SetupSuite' || name === 'SetupTest') {
|
|
289
|
+
const calls = this.extractFunctionCalls(bodyNode);
|
|
290
|
+
blocks.push({
|
|
291
|
+
type: name === 'SetupSuite' ? 'beforeAll' : 'beforeEach',
|
|
292
|
+
line: node.startPosition.row + 1,
|
|
293
|
+
calls,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
if (name === 'TearDownSuite' || name === 'TearDownTest') {
|
|
297
|
+
const calls = this.extractFunctionCalls(bodyNode);
|
|
298
|
+
blocks.push({
|
|
299
|
+
type: name === 'TearDownSuite' ? 'afterAll' : 'afterEach',
|
|
300
|
+
line: node.startPosition.row + 1,
|
|
301
|
+
calls,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
return blocks;
|
|
308
|
+
}
|
|
309
|
+
findImports(root) {
|
|
310
|
+
const imports = [];
|
|
311
|
+
this.walkNode(root, (node) => {
|
|
312
|
+
if (node.type === 'import_spec') {
|
|
313
|
+
const pathNode = node.childForFieldName('path');
|
|
314
|
+
if (pathNode) {
|
|
315
|
+
imports.push(pathNode.text.replace(/^"|"$/g, ''));
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
return imports;
|
|
320
|
+
}
|
|
321
|
+
extractAssertions(node) {
|
|
322
|
+
const assertions = [];
|
|
323
|
+
this.walkNode(node, (child) => {
|
|
324
|
+
if (child.type === 'call_expression') {
|
|
325
|
+
const funcNode = child.childForFieldName('function');
|
|
326
|
+
if (funcNode?.type === 'selector_expression') {
|
|
327
|
+
const operandNode = funcNode.childForFieldName('operand');
|
|
328
|
+
const fieldNode = funcNode.childForFieldName('field');
|
|
329
|
+
if (fieldNode) {
|
|
330
|
+
const method = fieldNode.text;
|
|
331
|
+
const receiver = operandNode?.text ?? '';
|
|
332
|
+
// Standard testing.T assertions
|
|
333
|
+
if (method === 'Error' ||
|
|
334
|
+
method === 'Errorf' ||
|
|
335
|
+
method === 'Fatal' ||
|
|
336
|
+
method === 'Fatalf' ||
|
|
337
|
+
method === 'Fail' ||
|
|
338
|
+
method === 'FailNow') {
|
|
339
|
+
assertions.push({
|
|
340
|
+
matcher: method,
|
|
341
|
+
line: child.startPosition.row + 1,
|
|
342
|
+
isErrorAssertion: true,
|
|
343
|
+
isEdgeCaseAssertion: false,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
// testify assertions (assert.* or require.*)
|
|
347
|
+
if (receiver.includes('assert') || receiver.includes('require')) {
|
|
348
|
+
assertions.push({
|
|
349
|
+
matcher: `${receiver}.${method}`,
|
|
350
|
+
line: child.startPosition.row + 1,
|
|
351
|
+
isErrorAssertion: method.includes('Error') || method.includes('Panic'),
|
|
352
|
+
isEdgeCaseAssertion: method === 'Nil' ||
|
|
353
|
+
method === 'NotNil' ||
|
|
354
|
+
method === 'Empty' ||
|
|
355
|
+
method === 'NotEmpty' ||
|
|
356
|
+
method === 'Zero' ||
|
|
357
|
+
method === 'True' ||
|
|
358
|
+
method === 'False' ||
|
|
359
|
+
method === 'Len' ||
|
|
360
|
+
method === 'Contains',
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
// gomega assertions
|
|
364
|
+
if (method === 'Expect' || method === 'Should' || method === 'To' || method === 'Ω') {
|
|
365
|
+
assertions.push({
|
|
366
|
+
matcher: method,
|
|
367
|
+
line: child.startPosition.row + 1,
|
|
368
|
+
isErrorAssertion: false,
|
|
369
|
+
isEdgeCaseAssertion: false,
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
return assertions;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Override to add Go-specific test framework calls
|
|
380
|
+
*/
|
|
381
|
+
isTestFrameworkCall(name) {
|
|
382
|
+
const goTestCalls = [
|
|
383
|
+
// Standard testing
|
|
384
|
+
'Error',
|
|
385
|
+
'Errorf',
|
|
386
|
+
'Fatal',
|
|
387
|
+
'Fatalf',
|
|
388
|
+
'Fail',
|
|
389
|
+
'FailNow',
|
|
390
|
+
'Log',
|
|
391
|
+
'Logf',
|
|
392
|
+
'Skip',
|
|
393
|
+
'Skipf',
|
|
394
|
+
'Run',
|
|
395
|
+
'Cleanup',
|
|
396
|
+
'Helper',
|
|
397
|
+
'Parallel',
|
|
398
|
+
// testify
|
|
399
|
+
'Equal',
|
|
400
|
+
'NotEqual',
|
|
401
|
+
'True',
|
|
402
|
+
'False',
|
|
403
|
+
'Nil',
|
|
404
|
+
'NotNil',
|
|
405
|
+
'NoError',
|
|
406
|
+
'Error',
|
|
407
|
+
'Contains',
|
|
408
|
+
'Len',
|
|
409
|
+
'Empty',
|
|
410
|
+
'NotEmpty',
|
|
411
|
+
// gomock
|
|
412
|
+
'EXPECT',
|
|
413
|
+
'Return',
|
|
414
|
+
'Times',
|
|
415
|
+
'AnyTimes',
|
|
416
|
+
'DoAndReturn',
|
|
417
|
+
// ginkgo
|
|
418
|
+
'Describe',
|
|
419
|
+
'Context',
|
|
420
|
+
'It',
|
|
421
|
+
'BeforeEach',
|
|
422
|
+
'AfterEach',
|
|
423
|
+
'BeforeSuite',
|
|
424
|
+
'AfterSuite',
|
|
425
|
+
'Expect',
|
|
426
|
+
];
|
|
427
|
+
return goTestCalls.includes(name) || super.isTestFrameworkCall(name);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Create a Go test extractor instance
|
|
432
|
+
*/
|
|
433
|
+
export function createGoTestExtractor(parser) {
|
|
434
|
+
return new GoTestExtractor(parser);
|
|
435
|
+
}
|
|
436
|
+
//# sourceMappingURL=go-test-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-test-extractor.js","sourceRoot":"","sources":["../../../src/test-topology/extractors/go-test-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAU7D,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,iBAAiB,GAAkC;IACvD,OAAO,EAAE,YAAY;IACrB,6BAA6B,EAAE,SAAS;IACxC,oCAAoC,EAAE,SAAS;IAC/C,qCAAqC,EAAE,SAAS;IAChD,mCAAmC,EAAE,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T,KAAK;YACL,MAAM;YACN,MAAM;YACN,OAAO;YACP,KAAK;YACL,SAAS;YACT,QAAQ;YACR,UAAU;YACV,UAAU;YACV,OAAO;YACP,UAAU;YACV,MAAM;YACN,OAAO;YACP,KAAK;YACL,QAAQ;YACR,SAAS;YACT,OAAO;YACP,UAAU;YACV,KAAK;YACL,OAAO;YACP,UAAU;YACV,SAAS;YACT,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,UAAU;YACV,aAAa;YACb,SAAS;YACT,UAAU;YACV,SAAS;YACT,IAAI;YACJ,YAAY;YACZ,WAAW;YACX,aAAa;YACb,YAAY;YACZ,QAAQ;SACT,CAAC;QAEF,OAAO,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvE,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -9,4 +9,5 @@ export { PythonTestExtractor, createPythonTestExtractor } from './python-test-ex
|
|
|
9
9
|
export { JavaTestExtractor, createJavaTestExtractor } from './java-test-extractor.js';
|
|
10
10
|
export { CSharpTestExtractor, createCSharpTestExtractor } from './csharp-test-extractor.js';
|
|
11
11
|
export { PHPTestExtractor, createPHPTestExtractor } from './php-test-extractor.js';
|
|
12
|
+
export { GoTestExtractor, createGoTestExtractor } from './go-test-extractor.js';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-topology/extractors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-topology/extractors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -9,4 +9,5 @@ export { PythonTestExtractor, createPythonTestExtractor } from './python-test-ex
|
|
|
9
9
|
export { JavaTestExtractor, createJavaTestExtractor } from './java-test-extractor.js';
|
|
10
10
|
export { CSharpTestExtractor, createCSharpTestExtractor } from './csharp-test-extractor.js';
|
|
11
11
|
export { PHPTestExtractor, createPHPTestExtractor } from './php-test-extractor.js';
|
|
12
|
+
export { GoTestExtractor, createGoTestExtractor } from './go-test-extractor.js';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test-topology/extractors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAA6C,MAAM,0BAA0B,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test-topology/extractors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,iBAAiB,EAA6C,MAAM,0BAA0B,CAAC;AACxG,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go Test Regex Extractor
|
|
3
|
+
*
|
|
4
|
+
* Regex-based fallback for extracting test information when tree-sitter is unavailable.
|
|
5
|
+
* Supports Go testing package, testify, ginkgo, and gomock frameworks.
|
|
6
|
+
*
|
|
7
|
+
* @requirements Go Language Support
|
|
8
|
+
*/
|
|
9
|
+
import type { TestExtraction, TestCase, MockStatement, SetupBlock, TestFramework } from '../../types.js';
|
|
10
|
+
export declare class GoTestRegexExtractor {
|
|
11
|
+
readonly language: "go";
|
|
12
|
+
readonly extensions: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Extract test information using regex patterns
|
|
15
|
+
*/
|
|
16
|
+
extract(content: string, filePath: string): TestExtraction;
|
|
17
|
+
/**
|
|
18
|
+
* Detect test framework from imports and patterns
|
|
19
|
+
*/
|
|
20
|
+
detectFramework(content: string): TestFramework;
|
|
21
|
+
/**
|
|
22
|
+
* Extract test cases from content
|
|
23
|
+
*/
|
|
24
|
+
extractTestCases(content: string, filePath: string, framework: TestFramework): TestCase[];
|
|
25
|
+
/**
|
|
26
|
+
* Extract test body based on brace matching
|
|
27
|
+
*/
|
|
28
|
+
private extractTestBody;
|
|
29
|
+
/**
|
|
30
|
+
* Extract function calls from test body
|
|
31
|
+
*/
|
|
32
|
+
private extractFunctionCalls;
|
|
33
|
+
/**
|
|
34
|
+
* Extract assertions from test body
|
|
35
|
+
*/
|
|
36
|
+
private extractAssertions;
|
|
37
|
+
/**
|
|
38
|
+
* Extract mock statements
|
|
39
|
+
*/
|
|
40
|
+
extractMocks(content: string): MockStatement[];
|
|
41
|
+
/**
|
|
42
|
+
* Extract setup blocks
|
|
43
|
+
*/
|
|
44
|
+
extractSetupBlocks(content: string): SetupBlock[];
|
|
45
|
+
/**
|
|
46
|
+
* Check if a function name is a test framework call
|
|
47
|
+
*/
|
|
48
|
+
private isTestFrameworkCall;
|
|
49
|
+
/**
|
|
50
|
+
* Get line number from character index
|
|
51
|
+
*/
|
|
52
|
+
private getLineNumber;
|
|
53
|
+
/**
|
|
54
|
+
* Calculate test quality signals
|
|
55
|
+
*/
|
|
56
|
+
private calculateQuality;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Factory function
|
|
60
|
+
*/
|
|
61
|
+
export declare function createGoTestRegexExtractor(): GoTestRegexExtractor;
|
|
62
|
+
//# sourceMappingURL=go-test-regex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-test-regex.d.ts","sourceRoot":"","sources":["../../../../src/test-topology/extractors/regex/go-test-regex.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,UAAU,EAGV,aAAa,EACd,MAAM,gBAAgB,CAAC;AAMxB,qBAAa,oBAAoB;IAC/B,QAAQ,CAAC,QAAQ,EAAG,IAAI,CAAU;IAClC,QAAQ,CAAC,UAAU,WAAW;IAE9B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc;IA2B1D;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa;IAiB/C;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,QAAQ,EAAE;IAsIzF;;OAEG;IACH,OAAO,CAAC,eAAe;IA8BvB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA+B5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6EzB;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE;IA0E9C;;OAEG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE;IAgFjD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAuB3B;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CA8BzB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,oBAAoB,CAEjE"}
|