forge coverage skips main contract entirely — not shown in CLI table or LCOV output
              
              #12185
            
            
              
                Unanswered
              
          
                  
                    
                      web3pavlou
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When running
forge coverage, everything compiles and tests execute successfully.However, the main contract under test (
src/DSCEngine.sol) does not appear anywhere in:All other files (scripts, mocks, helper contracts, etc.) appear normally.
This seems to be a regression or instrumentation omission specific to this contract.
src/DSCEngine.solis completely missing from both CLI and LCOV output.Example Output
CLI summary:
But
src/DSCEngine.solis missing completely.LCOV snippet:
No entry exists for
src/DSCEngine.solat all.✅ What Works
DSCEngineTest.t.solruns 42 tests, all passing).forge coveragefinishes successfully and writes the LCOV file.❌ What Fails
DSCEngine.sol) is skipped from coverage instrumentation entirely.⚙️ foundry.toml
Environment
Additional Context
src/DSCEngine.solis imported and used directly inDSCEngineTest.t.sol.--report lcov,--report debug, or specifying--contracts src/DSCEngine.sol.Beta Was this translation helpful? Give feedback.
All reactions