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

CA1844 #24278

Merged
merged 15 commits into from
Jul 1, 2021
Merged

CA1844 #24278

merged 15 commits into from
Jul 1, 2021

Conversation

NewellClark
Copy link
Contributor

@NewellClark NewellClark commented May 18, 2021

Summary

Add docs for CA1844: Override Stream ReadAsync/WriteAsync Analyzer

Tracking issue

Quick question: when it comes to providing sample code, is there a limit to how big it should be? In this case, do you want me to provide an entire Stream subclass that the user can copy into their editor and compile immediately? I'm more than happy to do that, however it would result in a large amount of boiler-plate code that has nothing to do with the analyzer. Would it be better to just include sample methods without an entire stream class?

@NewellClark NewellClark requested a review from a team as a code owner May 18, 2021 20:24
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
@gewarren
Copy link
Contributor

Quick question: when it comes to providing sample code, is there a limit to how big it should be? In this case, do you want me to provide an entire Stream subclass that the user can copy into their editor and compile immediately? I'm more than happy to do that, however it would result in a large amount of boiler-plate code that has nothing to do with the analyzer. Would it be better to just include sample methods without an entire stream class?

For code analysis rule reference, we usually just have code snippets, not entire samples. However, you could upload the sample to https://github.com/dotnet/samples and then add a link to the full sample from the article.

docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
docs/fundamentals/code-analysis/quality-rules/ca1844.md Outdated Show resolved Hide resolved
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@BillWagner BillWagner modified the milestones: May 2021, June 2021 Jun 7, 2021
@BillWagner BillWagner merged commit a45aa5e into dotnet:main Jul 1, 2021
Youssef1313 added a commit to Youssef1313/docs that referenced this pull request Jul 5, 2021
* Add ca1844.md

* Update ca1844.md

* Fix lint errors

* Remove trailing spaces

* Fix build warnings

* Update toc.yml

* Update index.md

* Update performance-warnings.md

* Update performance-warnings.md

* Update index.md

* Update docs/fundamentals/code-analysis/quality-rules/ca1844.md

Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>

* Update docs/fundamentals/code-analysis/quality-rules/ca1844.md

Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>

* Update docs/fundamentals/code-analysis/quality-rules/ca1844.md

Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>

* Apply suggestions from code review

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>

Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants