Skip to content

Conversation

ashawley
Copy link
Member

@ashawley ashawley commented May 5, 2017

This is a follow-up to #143

  • Unused imports
  • Unused code (in tests)
  • Local var never set (convert to val)
[warn] scala-xml/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala:4: Unused import
[warn] import org.junit.Ignore
[warn]
[warn] jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala:4: Unused import
[warn] import org.junit.Ignore
[warn]                  ^
[warn] shared/src/test/scala/scala/xml/PatternMatching.scala:83: local var m in method nodeSeq is never set: consider using immutable val
[warn]     var m: PartialFunction[Any, Any] = { case SafeNodeSeq(s @ _*) => s }
[warn]         ^
[warn] shared/src/test/scala/scala/xml/Transformers.scala:6: Unused import
[warn] import org.junit.Assert.assertTrue
[warn]                         ^
[warn] shared/src/test/scala/scala/xml/XMLTest.scala:264: local val z in method XmlEy is never used
[warn]     val z = ax \ "@{the namespace from outer space}foo"
[warn]                ^
[warn] three warnings found
[warn] 3 warnings found

This will fix all the warnings for 2.12 except for the ones from Stack, which see #147

- Unused imports
- Unused code (in tests)
- Local var never set (convert to val)

[warn] scala-xml/jvm/src/test/scala/scala/xml/XMLSyntaxTest.scala:4: Unused import
[warn] import org.junit.Ignore
[warn]
[warn] jvm/src/test/scala/scala/xml/parsing/Ticket0632Test.scala:4: Unused import
[warn] import org.junit.Ignore
[warn]                  ^
[warn] shared/src/test/scala/scala/xml/PatternMatching.scala:83: local var m in method nodeSeq is never set: consider using immutable val
[warn]     var m: PartialFunction[Any, Any] = { case SafeNodeSeq(s @ _*) => s }
[warn]         ^
[warn] shared/src/test/scala/scala/xml/Transformers.scala:6: Unused import
[warn] import org.junit.Assert.assertTrue
[warn]                         ^
[warn] shared/src/test/scala/scala/xml/XMLTest.scala:264: local val z in method XmlEy is never used
[warn]     val z = ax \ "@{the namespace from outer space}foo"
[warn]                ^
[warn] three warnings found
[warn] 3 warnings found
@som-snytt
Copy link
Contributor

LGTM

very satisfying.

@ashawley ashawley merged commit 8ae1bb4 into scala:master May 6, 2017
@ashawley ashawley deleted the 2.12-lint-warnings branch May 11, 2017 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants