{"action":"created","issue":{"url":"https://api.github.com/repos/scalatest/scalatest/issues/630","repository_url":"https://api.github.com/repos/scalatest/scalatest","labels_url":"https://api.github.com/repos/scalatest/scalatest/issues/630/labels{/name}","comments_url":"https://api.github.com/repos/scalatest/scalatest/issues/630/comments","events_url":"https://api.github.com/repos/scalatest/scalatest/issues/630/events","html_url":"https://github.com/scalatest/scalatest/issues/630","id":91453555,"number":630,"title":"report absolute file and line number of failing test","user":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-06-27T12:07:47Z","updated_at":"2016-06-06T21:34:30Z","closed_at":null,"body":"Many text editors can perform automatic \"jump to error\" and so on if the absolute file and line number is included in a warn/error message.\r\n\r\nIt would be incredibly useful for emacs/Vim/sublime/atom integration if failing scalatests were reported with full path and line number (emacs even supports column number).\r\n\r\nThe failing line in the test need not be automatically discovered (unrolling the stacktrace can be a pretty tough job), it is enough to have the line that begins the test.\r\n\r\nFor example, today if my test fails I see this:\r\n\r\n```\r\n[info] - should marshal DebugLocation *** FAILED ***\r\n[info]   SexpCons(SexpSymbol(:return),SexpCons(SexpCons(SexpSymbol(:ok),SexpCons(SexpCons(SexpSymbol(:type),SexpCons(SexpSymbol(reference),SexpCons(SexpSymbol(:object-id),SexpCons(SexpString(57),SexpNil)))),SexpNil)),SexpCons(SexpNumber(666),SexpNil))) was not equal to SexpCons(SexpSymbol(:type),SexpCons(SexpSymbol(reference),SexpCons(SexpSymbol(:object-id),SexpCons(SexpString(57),SexpNil)))) (SwankFormatsSpec.scala:20)\r\n[info]   org.scalatest.exceptions.TestFailedException:\r\n[info]   at org.scalatest.MatchersHelper$.newTestFailedException(MatchersHelper.scala:160)\r\n[info]   at org.scalatest.Matchers$AnyShouldWrapper.shouldBe(Matchers.scala:6408)\r\n... big stack trace ...\r\n```\r\n\r\nNote the failing line 20 in the error message is just some utility, not the actual test, and the filename is not absolute. We could potentially infer the filename using ENSIME, but that means this won't work without an ENSIME server.\r\n\r\nbut if it was like this, then I'd be able to jump to that failing test easily:\r\n\r\n```\r\n[info] - should marshal DebugLocation *** FAILED *** /path/to/my/file/SwankFormatsSpec.scala:100\r\n...\r\n```\r\n\r\nThen the filepath and line can be extracted with a pattern match.\r\n\r\nSome people might find it useful to have the filename/line on ignored tests as well.\r\n\r\nI've tried my best to get something working in https://github.com/hvesalai/sbt-mode/pull/29 but my changes only allow the user to jump the cursor to the failure message, it doesn't open up the failed test's source code."},"comment":{"url":"https://api.github.com/repos/scalatest/scalatest/issues/comments/224095643","html_url":"https://github.com/scalatest/scalatest/issues/630#issuecomment-224095643","issue_url":"https://api.github.com/repos/scalatest/scalatest/issues/630","id":224095643,"user":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T21:34:30Z","updated_at":"2016-06-06T21:34:30Z","body":"Better if it's one line, I like the version with two asterisks (although it would be better if on the same line as the FAILED)"}}
{"actor":{"display_login":"fommil"}}