-
-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add simple diagnostic output to InterfaceStubGenerator. #79
Conversation
Diagnostic messages use Visual Studio format (see: http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx)
Does this work in Xamarin Studio on OS X? |
Can't install Xamarin Studio on my mac (OS X version too old) but it should just work: http://forums.xamarin.com/discussion/13117/can-xamarin-recognize-warnings-errors-produced-by-custom-build-commands |
Looks like it works (on Xamarin Studio on Mac, that is). Lemme review this (or maybe @bennor can +1 it), then we'll merge it |
Works for me too. I made quite a big system for only this small change but I think more warnings/errors will come as the project get bigger. |
Firstly, awesome idea! 👍 I had no idea you could do that so easily. It works perfectly (in VS at least) and it's cool to be able to double-click the warnings to go straight to the busted method. 😸
@paulcbetts that style manifesto you hinted at writing a while back would probably be helpful for people who are new to working on your stuff. 😉 |
var builder = new StringBuilder(); | ||
|
||
foreach (var diagnostic in diagnostics) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⬆️
It's stuck on a machine I can't get to atm 😿 |
Ugh, that is the worst 😞 If only there were a place you could store files online and get to them from anywhere, eh? 😉 |
@bennor lol this was a surprise'ish machine death, it's actually on a Time Machine backup |
Computers. 😭 |
I removed the this and put brackets on the right line. Regarding messaging, I raised warnings as the compilation is working. |
Regarding code style, I found a Visual Studio extension that can change VS settings when a settings file is present next to a solution. |
@nekresh There's a bunch of these, the problem is that nobody uses the same one. The most ubiquitous is Resharper Team Settings, but I don't use it :( |
@paulcbetts I use ReSharper (I kind of hate it but hate writing boilerplate more, so I keep persisting with it 😞). Anyway, I have a personal settings file that doesn't completely match the coding style but gets about 99% of the way there. I can check it in as a Team Shared file if you want? Then people who do use it won't unintentionally mangle the code. It's just a XAML Resource Dictionary and the settings names are mostly clear enough that you should be able to validate the settings just by reading the file. |
Other than loading LINQ queries into the condition of the loops, I think this is looking really good now. I'm happy for it to be merged once that's taken care of. 👍 |
Would it be interesting to generate errors for unsupported constructions like properties in refit interface ? |
I'm not sure about that. As you say, it will generate a fairly obvious error as it is, and there's only so much we can protect people from themselves. |
Looking good. Thanks @nekresh! |
Add simple diagnostic output to InterfaceStubGenerator.
👍 |
Diagnostic messages use Visual Studio format (see:
http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx)