Skip to content
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

Adding files to map compiler diagnostics to built-in code fixes #30251

Closed
wants to merge 1 commit into from

Conversation

Neme12
Copy link
Contributor

@Neme12 Neme12 commented Oct 1, 2018

Idea from #23326 (comment):

@sharwell That list is very nice, but it's a bit empty. Do you think it would be a good idea to put that somewhere in the Roslyn repo as a markdown file (maybe /docs/ide) so that anyone could contribute to it, either by linking to an issue they created or a code fix?

Perhaps that file could also link to the spreadsheet.

also tagging @jinujoseph

The code fix fields are currently empty, but adding these files to the repo would allow contributors to fill them in if they file an issue, make a new code fix or simply decide to fill out the existing code fixes.

The diagnostics for both languages are updated with current master branch.

@Neme12 Neme12 force-pushed the compilerDiagnostics branch from 6ac8fe0 to d4d2d38 Compare October 1, 2018 22:04
@jinujoseph jinujoseph added Documentation Community The pull request was submitted by a contributor who is not a Microsoft employee. labels Oct 1, 2018
@sharwell
Copy link
Member

sharwell commented Oct 1, 2018

Speaking from experience, this is really hard to maintain by hand, both for auditing the current state and proposing new fixes.

  • Many error codes have fixes for certain conditions, but additional fixes may be relevant
  • Many fixes apply to multiple error codes

@Neme12
Copy link
Contributor Author

Neme12 commented Oct 1, 2018

@sharwell But the issues are created by hand. How would you like to automate linking issues to the diagnostics they're asking a code fix for?

@Neme12
Copy link
Contributor Author

Neme12 commented Oct 1, 2018

Many error codes have fixes for certain conditions, but additional fixes may be relevant

You're right. That's why I called the column "Code fixes" as opposed to "Code fix".

Many fixes apply to multiple error codes

Why is that a problem?

@Neme12
Copy link
Contributor Author

Neme12 commented Oct 1, 2018

@sharwell We could write a tool that would go through Roslyn, find all the code fixes that fix compiler diagnostics and add them to this document. What do you think about that?

The issue management would still need to be manual though,that's why this would be a hand-editable document that people can contribute to.

@sharwell
Copy link
Member

sharwell commented Oct 1, 2018

We could write a tool that would go through Roslyn, find all the code fixes that fix compiler diagnostics and add them to this document. What do you think about that?

Overall, I've been very happy with this as a targeted solution. For example, the JSON file backing the StyleCop Analyzers Status page is produced by code analysis that runs in the AppVeyor build. This would certainly be feasible for the "current state" problem, but doesn't address the linked issues. I never found a solution to the whole thing I was super happy with, and didn't want to commit to something I wasn't happy with considering there are over 1,000 codes to keep track of.

@Neme12 Neme12 closed this Oct 1, 2018
@Neme12 Neme12 deleted the compilerDiagnostics branch October 1, 2018 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community The pull request was submitted by a contributor who is not a Microsoft employee. Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants