New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaned up all the warn-unused and warn-unused-import issues #244
Cleaned up all the warn-unused and warn-unused-import issues #244
Conversation
…ling compilation error upon occuring unused problem.
def page(stats: Stat*) = """ | ||
def page(stats: Stat*) = { | ||
stats.unused | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe missing s
interpolation 🤔 ?
squeryl/src/main/scala/org/squeryl/logging/BarChartRenderer.scala
Lines 111 to 113 in 7b2b170
function drawVisualization() {{ | |
{Unparsed(funcCalls(stats))} | |
}} |
function drawVisualization() {{
- {Unparsed(funcCalls(stats))}
+ ${Unparsed(funcCalls(stats))}
}}
|
||
package object squeryl { | ||
|
||
implicit class IdOps[A](a: A) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "-Xfatal-warnings"
and IdOps
are too much 😕
Hi @xuwei-k, I have addressed all the changes you requested by removing -Xfatal-warnings and IdOps and cleaning up the I believe there would be a some value in having the fatal warnings being switched on, but you're probably right that the obfuscation it leads to (by the means of adding IdOps) is too much. So let's just treat this merge request as a cleanup of the unused code. |
Hmmm 🤔 I think some (not private method) parameters (e.g. |
The change is a pure cleanup change (no functional changes) to fix the problems reported by the unused checks (-Ywarn-unused and -Ywarn-unused-import) and enforcing the checks by adding -Xfatal-warnings (will result in a compilation error should any new unused code section be introduced).
In some cases (where the method is a public one and can be overriden by the client) in order not to break the API removing the warning required marking the parameter explicitly as unused based on a solution proposed here: https://stackoverflow.com/questions/46128561/excluding-type-evidence-parameters-from-analysis-in-scala-when-using-ywarn-unus