Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow clicking through to source of mutability reason #43
Currently, when a unit test fails, it displays all the reasons a class is mutable. Each reason is printed with a location, the 'primary' source of mutability, for example, [Field: hash, Class: java.lang.String] for the hash field that can be reassigned. A user will have to read this then navigate to the file and field themselves.
Text output in test failure shown here:
We can do more to make it easier to find the source of mutability. At least two of the three major IDEs (Eclipse and Intellij, not checked NetBeans) have functionality that interprets elements of a stack trace, to allow clicking through to source.
This is achieved by having a string which matches a particular format, like:
We could take advantage of this trick in the IDEs to allow us to print locations which are clickable.
This issue would represent three bits of work:
By "fix the linking" do you mean a code change that will print out the format that becomes a link, but not the change to provide accurate numbers? I think that would be a reasonable chunk to contribute. Perhaps there should be a class/interface/datastructure that can be created (if it doesn't already exist) that can be printed out, but maybe just is created with dummy line numbers for now, but can be filed in accurately when #46 is complete.
Would be happy to merge that part separately.