Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Steps to reproduce:
- enable source analysis in preferences
- make your code in a state that you have either warnings or errors in your code (that source analysis can detect them)
- click on the yellow box (in case of warnings) or on the red box (in case of errors)
- nothing happens
- it goes to first error, if no error exists, it goes to first (detected) warning that appears in source
In a similar note: clicking (close to) any warning/error line should select it.
By "goes to" I mean:
- move caret in source to point to where the warning is happening
- auto-open the expansion menu with suggestions for auto-fix
This will simplify this use-case:
- user notices that it inherits an old codebase that doesn't use "var" in it, but it wants to clean it up
- user opens the files one by one
- for every warning it clicks on the bottom-right yellow bar (that points to "change to var" hint) and presses "1", meaning the first fix
Actual result: (for previous use-case) is:
- user clicks in the side bar, looks to the left where is the "wrong line", and after that clicks alt-enter and eventually press 1
It's a good idea that'll give the box some usability.
I'll implement it when I revisit the source analysis UI.
I did notice that after I upgraded to the Git version of NRefactor (and I replaced it in-place inside XS 4.0 installation) that the "hints" bar is working. So just the error-square (on the bottom) is not working.
There are some safe fixes that can be done I think automatically:
- use var always
- remove redundant usings
- remove redundant this.
- remove redundant namespaces (where possible)
If you think that will be done, I can write to you another bug entry.
Also I can confirm reported and you made them as resolved, I tested them and they look fixed (and work much more natural than I expected, so good job!)
I don't think that auto fixes are a good thing.
If someone contributes such a command / option I wouldn't say no. But mangling with source code as default is a bad thing. Even such things like changing eol markers that they're coherent inside a project result in many, many requests to remove that feature ...
Having something like a dialog - or message bar popping up and asking for such things is another story - that can be done but I don't think we'll be doing it - but the UI of the source analysis isn't finished it was just my first shot. It's up to our interface designers to improve it :)
got implemented :)
I have checked this issue with following builds:
X.S 4.2.3(build 24)
Now I am seeing proper usability for errors and warning. This is the screencast for the same: http://screencast.com/t/cN1g0mwGVFD