<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 7 August 2018 at 18:29, Sam McCall <span dir="ltr"><<a href="mailto:sammccall@google.com" target="_blank">sammccall@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Good question! I'm not aware of any discussion around this.</div><div dir="auto"><br></div><div dir="auto">Using the diagnostic category seems a little course-grained, I think the most natural fit would be the diagnostic name itself like "warn_asm_qualifier_ignored".</div><div dir="auto"><br></div><div dir="auto">If you want the category too, any of these seem ok to me:</div><div dir="auto">- code = category/name, e.g. "Parse/<span style="font-family:sans-serif">warn_asm_qualifier_<wbr>ignored"</span></div></div></blockquote><div><br></div><div>Just to make sure I understand this correctly: for warnings the code would be something like "Parse Issue/warn_asm_qualifier_ignored", and for errors we would just send "Semantic Issue/"?</div><div>That should work for us.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><span style="font-family:sans-serif">- add "category" attribute to diagnostic as LSP extension (I'd have no problem with keeping this always on)</span></div><div dir="auto"><span style="font-family:sans-serif">- keep a lookup table in the client (if consuming the tabledef files and maintaining version lock works for you)</span></div></div></blockquote><div><br></div><div>Not really, we want to send the category name from the server.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">What do you think?</span></div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div><div class="h5"><div dir="ltr">On Wed, Aug 8, 2018, 01:50 Alex L via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org" target="_blank">clangd-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>I noticed that Clangd doesn't currently use LSP's 'code' field in the Diagnostic structure when publishing the diagnostics. I would like to use it to send the name of the diagnostic's category to the client (e.g. "Semantic Issue" / "Parsing Issue"). Would it make sense to use the 'code' field for this, and would it make sense to turn it on by default? Are there any other plans to use it for something else instead?</div><div><br></div><div>Cheers,</div><div>Alex</div></div></div></div>
______________________________<wbr>_________________<br>
clangd-dev mailing list<br>
<a href="mailto:clangd-dev@lists.llvm.org" rel="noreferrer" target="_blank">clangd-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/clangd-dev</a><br>
</blockquote></div></div></div>
</blockquote></div><br></div></div>