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

CA1838 Avoid 'StringBuilder' parameters for P/Invokes #7186

Merged
merged 25 commits into from
Feb 15, 2022
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
994b696
CA1838 Avoid 'StringBuilder' parameters for P/Invokes
elachlan Dec 30, 2021
4b519a9
revert ruleset change
elachlan Jan 7, 2022
3a88ed9
rebase
elachlan Jan 7, 2022
638775f
Enable warning on CA1838
elachlan Jan 7, 2022
751fea3
Merge branch 'main' into CA1838
elachlan Jan 11, 2022
661c2c8
CA1838 Avoid 'StringBuilder' parameters for P/Invokes. Consider using…
elachlan Jan 11, 2022
4f0424c
trying again
elachlan Jan 12, 2022
e042e66
Changes from review
elachlan Jan 27, 2022
4ddf661
GetGacPath changes
elachlan Jan 27, 2022
8f0c31c
Making sure we are form strings properly
elachlan Jan 28, 2022
04e4a1b
changes from review
elachlan Jan 28, 2022
903f35d
Remove unused field
elachlan Jan 28, 2022
69cf05f
Use ArrayPool in GetRuntimeVersion and fix usage in GetModuleFileName
elachlan Jan 28, 2022
300179b
Refactor GetRuntimeVersion to remove loop and use stackalloc
elachlan Jan 28, 2022
c392277
changes from review
elachlan Jan 31, 2022
de3618c
Fix conflict and xml doc
elachlan Jan 31, 2022
a0178d7
Merge branch 'main' into CA1838
elachlan Jan 31, 2022
54878ac
Fix possible StackOverflow in GetShortPathName/GetLongPathName by mov…
elachlan Feb 1, 2022
567cc08
Merge branch 'CA1838' of github.com:elachlan/msbuild into CA1838
elachlan Feb 1, 2022
8af24e5
remove unneeded unsafe from pinvoke definitions
elachlan Feb 1, 2022
031af51
Added cached GAC Path and changes from review
elachlan Feb 2, 2022
b4f6bf7
Add documentation to Pinvoke
elachlan Feb 3, 2022
b5f60db
Changes from review
elachlan Feb 4, 2022
53d3da4
Change from review
elachlan Feb 8, 2022
0a97bfd
Add VerifyThrow instead of loop condition
elachlan Feb 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<Rule Id="CA1835" Action="Info" /> <!-- Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' -->
<Rule Id="CA1836" Action="Info" /> <!-- Prefer IsEmpty over Count -->
<Rule Id="CA1837" Action="Info" /> <!-- Use 'Environment.ProcessId' -->
<Rule Id="CA1838" Action="Info" /> <!-- Avoid 'StringBuilder' parameters for P/Invokes -->
<Rule Id="CA1838" Action="Warning" /> <!-- Avoid 'StringBuilder' parameters for P/Invokes -->
<Rule Id="CA2000" Action="None" /> <!-- Dispose objects before losing scope -->
<Rule Id="CA2002" Action="None" /> <!-- Do not lock on objects with weak identity -->
<Rule Id="CA2007" Action="Info" /> <!-- Consider calling ConfigureAwait on the awaited task -->
Expand Down