CLI: improve diagnostic message format

- render the whole line where the error/warning points to, if any, and another
  line with '^', like other compilers do
- lowercase diagnostic severity
- decapitalize the message if it doesn't start with a proper name
This commit is contained in:
Alexander Udalov
2015-06-13 03:43:20 +03:00
parent 46515afb22
commit 54dfd626ab
49 changed files with 316 additions and 134 deletions
+16 -6
View File
@@ -1,6 +1,16 @@
WARNING: compiler/testData/cli/jvm/classpath.kt: (8, 9) Variable 'a' is never used
WARNING: compiler/testData/cli/jvm/classpath.kt: (9, 9) Variable 'c' is never used
WARNING: compiler/testData/cli/jvm/classpath.kt: (10, 9) Variable 'e' is never used
WARNING: compiler/testData/cli/jvm/classpath.kt: (11, 9) Variable 'f' is never used
WARNING: compiler/testData/cli/jvm/classpath.kt: (12, 9) Variable 'j' is never used
OK
compiler/testData/cli/jvm/classpath.kt:8:9: warning: variable 'a' is never used
val a = Big5() // charsets.jar
^
compiler/testData/cli/jvm/classpath.kt:9:9: warning: variable 'c' is never used
val c = DNSNameService() // dnsns.ajr
^
compiler/testData/cli/jvm/classpath.kt:10:9: warning: variable 'e' is never used
val e : Cipher? = null // jce.jar
^
compiler/testData/cli/jvm/classpath.kt:11:9: warning: variable 'f' is never used
val f : SunJCE? = null // sunjce_provider.jar
^
compiler/testData/cli/jvm/classpath.kt:12:9: warning: variable 'j' is never used
val j : ByteBuffered? = null // rt.jar
^
OK