I’m using ExCoveralls to measure code coverage in an Ash-based project, and I noticed that lines written through Ash DSL macros don’t appear as SLOC in the coverage report.
For example, in the following action:
create :create_task do
...
change set_attribute(:state, "created")
end
the macro line isn’t counted toward coverage. However, when I rewrite it using an anonymous function:
create :create_task do
...
change fn changeset, _context ->
Ash.Changeset.set_attribute(changeset, :state, "created")
end
end
the lines inside the function are counted as SLOC.
Is there any recommended way to get meaningful coverage metrics when using Ash DSL macros?
Are there any tools or approaches that better support coverage reporting for Ash-generated code?
Thanks!






















