Open veverkap opened 7 years ago
This is a great idea!
Unfortunately, I am not sure how we would go about paring EEX templates into an AST.
On top of that - as my super late reply shows - I don't have the time, at the moment, to investigate this further.
Unfortunately, I am not sure how we would go about paring EEX templates into an AST.
Well as far as phoenix is concerned they get compiled into render/*
functions inside the appropriate *View
modules (gigantic IOList creation), and everywhere in the View modules should not have calls to ecto.
@OvermindDL1 sure
The question would be: how does one get the AST without compiling the templates? This might be crucial since Credo is a static analysis tool.
I would be interested in helping out to implement an optional check in credo to see if any calls to the database happen in the view. But I'd need a little pointer to get started.