-
Notifications
You must be signed in to change notification settings - Fork 866
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
improve warning message about global namespace class #457
Conversation
@@ -130,9 +130,10 @@ public override MetadataItem VisitAssembly(IAssemblySymbol symbol) | |||
item.Type = MemberType.Assembly; | |||
_references = new Dictionary<string, ReferenceItem>(); | |||
var namespaces = symbol.GlobalNamespace.GetNamespaceMembers().ToList(); | |||
if (namespaces.Count == 0) | |||
var allMembers = symbol.GlobalNamespace.GetMembers().ToList(); |
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.
how about getting the non namespace members directly?
👍 |
{ | ||
Logger.LogWarning($"No namespace is found in assembly {symbol.MetadataName}. DocFX currently only supports generating metadata with namespace defined."); | ||
Logger.LogWarning($"DocFX currently only supports generating metadata with namespace defined. The following types in assembly \"{symbol.MetadataName}\" will have no metadata generated: {string.Join(", ", allMembers.Except(namespaces).Select(m => m.MetadataName))}. "); |
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.
how about using \n{string.Join("\t")}
to make warning message more readable when there're too many non namespace members?
👍 |
1 similar comment
👍 |
fix #417
@chenkennt @vwxyzh @ansyral @hellosnow @qinezh