Bug 10718 - Usability improvement on source analysis warning/errors
Summary: Usability improvement on source analysis warning/errors
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 4.0
Hardware: PC Windows
: Normal enhancement
Target Milestone: 4.2.3 (from master)
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-02-27 02:19 UTC by Ciprian Khlud
Modified: 2014-01-06 06:04 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
VERIFIED FIXED

Description Ciprian Khlud 2013-02-27 02:19:47 UTC
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)

Actual result:
- nothing happens

Expected result:
- 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
Comment 1 Mike Krüger 2013-02-27 07:25:35 UTC
It's a good idea that'll give the box some usability.
I'll implement it when I revisit the source analysis UI.
Comment 2 Ciprian Khlud 2013-02-27 10:52:35 UTC
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!)
Comment 3 Mike Krüger 2013-02-27 10:57:10 UTC
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 :)
Comment 4 Mike Krüger 2013-09-04 07:22:14 UTC
got implemented :)
Comment 5 Prashant manu 2014-01-06 06:04:12 UTC
I have checked this issue with following builds:

All Mac
X.S 4.2.3(build 24)
Mono 3.2.6
X.Android 4.12.0-1
X.iOS 7.0.6.166

Now I am seeing proper usability for errors and warning. This is the screencast for the same: http://screencast.com/t/cN1g0mwGVFD