Conversation
- Add scripts/update-test-coverage-doc.sh that runs tests with coverage, parses results (coverage %, pass/fail counts, per-file breakdown), and updates the auto-generated sections in cadence/tests/TEST_COVERAGE.md - Add .github/workflows/update_test_coverage.yml that triggers on push to main (i.e. after PR merge) and runs the update script - Add HTML comment markers in TEST_COVERAGE.md to delineate the auto-generated stats table and per-file results table from the manually curated analysis sections https://claude.ai/code/session_01McrgPdo8SVWxQQ63j9Esbb
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Testing the linter in the latest version of Flow CLI (v2.15.1), it no longer crashes, so this PR should be good to go now |
ca067a0 to
72e36e8
Compare
Kay-Zee
left a comment
There was a problem hiding this comment.
There are 3 spots where we see unused vars that look like they should be used. The best guess here is that they're left overs from our refactors, but I need a bit of help confirming that.
| } | ||
|
|
||
| access(all) fun interestRate(creditBalance: UFix128, debitBalance: UFix128): UFix128 { | ||
| access(all) fun interestRate(creditBalance _: UFix128, debitBalance _1: UFix128): UFix128 { |
There was a problem hiding this comment.
yeah, prefixing with underscore works
|
|
||
| // Create a capability to the Pool for the Position resource | ||
| // The Pool is stored in the FlowALPv0 contract account | ||
| let poolCap = FlowALPv0.account.capabilities.storage.issue<auth(FlowALPModels.EPosition) &{FlowALPModels.PositionPool}>( |
There was a problem hiding this comment.
This was also mentioned as unused, is this leftover from our refactor @jordanschalm @nialexsan @liobrasil
There was a problem hiding this comment.
Yes, this is leftover from FLO-20 / PR #247.
Before that refactor, each Position carried its own pool capability: FlowALPv0.createPosition issued poolCap and passed it into FlowALPPositionResources.createPosition(id: id, pool: poolCap), and Position stored that capability.
FLO-20 changed the design to use a single shared contract-level pool capability in FlowALPPositionResources, wired once via setPoolCap(...) from FlowALPv0.init(). After that change, FlowALPPositionResources.createPosition no longer takes a pool argument, so this local poolCap in FlowALPv0.createPosition is no longer consumed anywhere and can be removed safely.
cc: @holyfuchs
| <-create PoolFactory(), | ||
| to: self.PoolFactoryPath | ||
| ) | ||
| let factory = self.account.storage.borrow<&PoolFactory>(from: self.PoolFactoryPath)! |
There was a problem hiding this comment.
and this as well @jordanschalm @nialexsan @liobrasil
There was a problem hiding this comment.
This one does not come from the February split. The exact local let factory = self.account.storage.borrow<&PoolFactory>(from: self.PoolFactoryPath)! is first introduced in fe20ab6 (2025-06-02, update Pool creation pattern to use a stored factory & add test supporting mocks). I checked that file version directly, and factory only appears at that declaration, so it is already unused in the introducing commit.
So there is no separate later commit where it transitions from used -> unused; it was introduced unused.
This is an older dead local carried forward through later renames/refactors, not something introduced by the February split.
| find cadence/contracts -name "*.cdc" | xargs flow cadence lint \ | ||
| | tee /dev/stderr | tail -n2 | grep -q "Lint passed" |
There was a problem hiding this comment.
Not sure if we want onflow/FlowYieldVaults#223 (comment) here, cc @holyfuchs
Summary
make linttarget that runsflow cadence linton all.cdcfiles and fails if problems are foundTest plan
make lintlocally and verify it reports lint results🤖 Generated with Claude Code