Bug 27186 - [MD Code Issue] GettextCatalog usage warning?
Summary: [MD Code Issue] GettextCatalog usage warning?
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: unspecified
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2015-02-18 12:10 UTC by Marius Ungureanu
Modified: 2017-07-19 18:40 UTC (History)
3 users (show)

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 for Bug 27186 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Marius Ungureanu 2015-02-18 12:10:59 UTC
As per https://github.com/xamarin/monodevelop/commit/2925e85#commitcomment-9803662, we should ensure that all calls to GettextCatalog.Get*String have a string as the first parameter.
Comment 1 Mikayla Hutchinson [MSFT] 2015-02-18 12:53:18 UTC
This is rather specific for an analysis rule, since it depends on the behavior of our gettext scanner. IMO it really belongs as a warning in the gettext scanner itself.

Alternate gettext scanners have existed that could analyze IL and follow constant string references, regardless where they came from.
Comment 2 Mike Krüger 2015-02-18 13:32:30 UTC
This is a perfect example of why we need the 'roslyn approach'.

The XS solution can need a specialized analysis rule for this :) ... but I fear that'll have be postponed until we have that thing running.
Comment 3 Marius Ungureanu 2015-02-18 14:10:58 UTC
That's what I wanted. Perfect.
Comment 4 Tom Opgenorth 2017-07-19 18:40:14 UTC
Thanks so much for taking the time to submit this report! Marking this report as CONFIRMED.