test(coverage): boost SonarCloud to 80%+ — grammar exclusion fix + 1500 new tests#35
Merged
Conversation
…etectors Adds 3-4 tests per detector covering the detectWithRegex() paths that were previously unreachable (Python: content > 500KB triggers ANTLR bypass; Java: NUL-byte content triggers JavaParser bypass → regex fallback). Detectors covered: - Python (10): PythonStructures, DjangoModel, DjangoAuth, FastAPIAuth, CeleryTask, DjangoView, FlaskRoute, FastAPIRoute, PydanticModel, SQLAlchemy - Java (4): SpringRest, SpringSecurity, JpaEntity (added to existing ClassHierarchyDetectorBranches section in JavaDetectorsBranchCoverageTest) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…al line coverage - Fix workflow sonar.exclusions to explicitly exclude grammar/** from analysis and coverage calculations (was being counted despite sonar-project.properties) - Add GraphStoreTopologyAndStatsTest: 33 tests for getTopology(), countEdges(), findEdgesPaginated(), getFilePathsWithCounts(), findNodesWithoutIncomingSemantic(), findEndpointNeighborsBatch(), searchLexical(), and more (289 uncovered lines) - Add extended tests for Python detectors: PythonStructures, DjangoModel, DjangoAuth, FastAPIAuth, FastAPIRoute, FlaskRoute, Pydantic, SQLAlchemy, CeleryTask (500+ uncovered lines) - Add extended tests for Java detectors: SpringRest, SpringSecurity, ClassHierarchy, JpaEntity, PublicApi (456 uncovered lines) - Add tests for CLI commands: BundleCommand, FlowCommand, TopologyCommand - Add tests for 0%-coverage classes: CacheFlowDataSource, KindConverterTest, LexicalQueryService, SpaController, ArtifactMetadata - Add ExpressRouteDetectorExtendedTest, FlowEngineExtendedTest, TopologyControllerExtendedTest, EvidencePackAssemblerExtendedTest - Fix ModelCoverageTest: write(null) throws IAE in Neo4j driver (not null value) - All 3219 tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
-Dsonar.exclusionsand-Dsonar.coverage.exclusionsfor**/grammar/**. The 646 uncovered grammar base class lines (CPP14ParserBase, CSharpLexerBase, etc.) were counting against coverage despitesonar-project.propertieshaving the exclusion — local line coverage jumps from 79.9% → 82.7% from this fix aloneFiles targeted by tests (SonarCloud data)
GraphStore.javaPythonStructuresDetector.javaClassHierarchyDetector.javaDjangoModelDetector.javaSpringRestDetector.javaFastAPIAuthDetector.javaJpaEntityDetector.javaDjangoAuthDetector.javaSpringSecurityDetector.javaTest plan
mvn testclean — zero failures, zero errors🤖 Generated with Claude Code