Skip to content

Feature: run Neo analyzers during nccs compilation#1905

Merged
ajara87 merged 9 commits into
neo-project:master-n3from
Jim8y:jim8y/issue1841-nccs-analyzer-suite
Jul 20, 2026
Merged

Feature: run Neo analyzers during nccs compilation#1905
ajara87 merged 9 commits into
neo-project:master-n3from
Jim8y:jim8y/issue1841-nccs-analyzer-suite

Conversation

@Jim8y

@Jim8y Jim8y commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a complete, deterministic Neo analyzer suite
  • run the suite before contract lowering when enabled
  • enable analyzer execution by default for the nccs CLI
  • keep library usage opt-in through CompilationOptions.RunAnalyzers
  • package the analyzer runtime with the compiler tool
  • preserve the existing Template test coverage boundary for the new transitive analyzer dependency

Why

A contract could pass through nccs without the diagnostics users see in an analyzer-enabled IDE. This allowed unsupported APIs and contract-specific restrictions to reach the lowering stage and produce less useful compiler errors.

Validation

  • compiler unit tests: 1496 passed
  • analyzer unit tests: 284 passed
  • analyzer execution tests: 5 passed
  • Template tests with coverage: 46 passed
  • generated lcov contains no analyzer source files from the Template test project
  • targeted dotnet format --verify-no-changes
  • compiler tool package boundary test

Part of #1841.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.30%. Comparing base (1fa8625) to head (cd13221).

Files with missing lines Patch % Lines
...iler.CSharp/CompilationEngine/CompilationEngine.cs 90.90% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           master-n3    #1905      +/-   ##
=============================================
+ Coverage      84.26%   84.30%   +0.03%     
=============================================
  Files            308      308              
  Lines          28342    28367      +25     
  Branches        4002     4005       +3     
=============================================
+ Hits           23882    23914      +32     
+ Misses          3464     3457       -7     
  Partials         996      996              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jim8y
Jim8y force-pushed the jim8y/issue1841-nccs-analyzer-suite branch from 487d975 to dc111f9 Compare July 18, 2026 11:18
@Jim8y
Jim8y force-pushed the jim8y/issue1841-nccs-analyzer-suite branch from dc111f9 to 853b99d Compare July 18, 2026 11:31
@Jim8y
Jim8y marked this pull request as ready for review July 18, 2026 12:33
@Jim8y
Jim8y requested review from ajara87 and shargon July 18, 2026 18:14
Comment thread src/Neo.SmartContract.Analyzer/NeoAnalyzerSuite.cs Outdated
@Jim8y
Jim8y requested a review from shargon July 20, 2026 01:46
@ajara87
ajara87 merged commit 1a4c35b into neo-project:master-n3 Jul 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants