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

CA1839: Avoid const arrays [NO MERGE] #5379

Closed
wants to merge 368 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
368 commits
Select commit Hold shift + click to select a range
d16627f
Merge branch 'release/6.0.1xx-preview2' into use-CancellationToken-Th…
NewellClark Feb 27, 2021
dea6979
Merge pull request #4887 from dotnet/merges/master-to-release/6.0.1xx…
mavasani Mar 3, 2021
e6a7324
Merge branch 'release/6.0.1xx-preview2' into merges/release/6.0.1xx-p…
jmarolf Mar 3, 2021
c054652
Merge pull request #4924 from dotnet/merges/master-to-release/6.0.1xx…
jmarolf Mar 3, 2021
940c426
Add analyzers/fixers for Environment.ProcessPath and CurrentManagedTh…
stephentoub Mar 8, 2021
eefe897
Merge pull request #4867 from dotnet/merges/release/6.0.1xx-preview1-…
jmarolf Mar 15, 2021
8eb850e
Merge release/6.0.1xx-preview2 to release/6.0.1xx-preview3 (#4902)
dotnet-bot Mar 15, 2021
df5ddc4
Merge remote-tracking branch 'dotnet/release/6.0.1xx-preview2' into m…
buyaa-n Mar 18, 2021
988eaf5
OSX is alias for MacOS (#4952)
buyaa-n Mar 18, 2021
5abaa41
Update Versions.props
jmarolf Mar 23, 2021
262ddfd
Merge pull request #4951 from dotnet/merges/release/6.0.1xx-preview2-…
mmitche Mar 30, 2021
2dda3d3
Merge pull request #4987 from dotnet/merges/release/6.0.1xx-preview3-…
mavasani Apr 8, 2021
e46220a
Merge pull request #4949 from dotnet/merges/release/6.0.1xx-preview1-…
mavasani Apr 8, 2021
1dcfb32
Remove unsupported attribute when allow deny list mixed (#5000)
buyaa-n Apr 8, 2021
43dfa18
Merge pull request #5004 from dotnet/merges/release/6.0.1xx-preview2-…
jmarolf Apr 9, 2021
04c867f
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
jmarolf Apr 9, 2021
e112315
Merge pull request #4976 from dotnet/merges/main-to-release/6.0.1xx-p…
jmarolf Apr 9, 2021
6c23dc8
Merge pull request #5010 from dotnet/merges/release/6.0.1xx-preview3-…
jmarolf Apr 12, 2021
86b88db
Merge pull request #5015 from dotnet/merges/main-to-release/6.0.1xx-p…
jmarolf Apr 12, 2021
135e126
OSX needs to treated as the same platform as MacOS, everywhere (#5012)
buyaa-n Apr 13, 2021
be17383
Merge pull request #5017 from dotnet/merges/main-to-release/6.0.1xx-p…
mavasani Apr 14, 2021
acf8240
Merge branch 'release/6.0.1xx-preview4' into merges/main-to-release/6…
mavasani Apr 14, 2021
e30830b
Merge pull request #5018 from dotnet/merges/main-to-release/6.0.1xx-p…
mavasani Apr 14, 2021
a513416
Merge pull request #5019 from dotnet/merges/main-to-release/6.0.1xx-p…
jmarolf Apr 14, 2021
d993fd4
Merge pull request #5020 from dotnet/merges/main-to-release/6.0.1xx-p…
mavasani Apr 15, 2021
ee92c7f
Merge branch 'release/6.0.1xx-preview4' into merges/main-to-release/6…
mavasani Apr 15, 2021
157932f
Merge pull request #5022 from dotnet/merges/main-to-release/6.0.1xx-p…
jmarolf Apr 15, 2021
1b1660d
Update Versions.props
jmarolf Apr 15, 2021
d8512c8
Add CSharp analyzer and tests
ryzngard Feb 5, 2021
accfc0e
Add VB analyzer and tests
ryzngard Feb 5, 2021
19c9121
Fix WaitAll message and title
ryzngard Feb 5, 2021
a99dc38
Add code fix and tests
ryzngard Feb 12, 2021
c37cfa4
Add unfixed cases to tests
ryzngard Feb 12, 2021
92a6d9f
Run msbuild /t:pack /v:m
ryzngard Feb 12, 2021
29858e3
Format
ryzngard Feb 19, 2021
79b0c78
Add assert
ryzngard Feb 19, 2021
50da58c
Apply suggestions from code review
ryzngard Feb 19, 2021
5f0762b
Update xlf files
ryzngard Feb 19, 2021
6e63890
Remove need for language specific syntax in analyzer
ryzngard Apr 8, 2021
59e68f9
Move to performance instead of usage
ryzngard Apr 8, 2021
ba0c6ce
Change to CA1839 and CA1840
ryzngard Apr 8, 2021
c9a5de5
Fix IsSingleTaskArgument
ryzngard Apr 14, 2021
8d70630
Merge pull request #5029 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Apr 16, 2021
11ddf1c
Change diagnostic id after rebase
ryzngard Apr 16, 2021
604a1f0
PR feedback
ryzngard Apr 16, 2021
6c41960
- Apply requested changes
NewellClark Apr 18, 2021
da54da0
Run msbuild
NewellClark Apr 18, 2021
fa6aa18
Merge branch 'release/6.0.1xx-preview4' into issue-35343
NewellClark Apr 18, 2021
a4fc8ad
Fix resx tag garbled in merge.
NewellClark Apr 18, 2021
4cc3687
Update dependencies from https://github.com/dotnet/arcade build 20210…
dotnet-maestro[bot] Apr 20, 2021
88f3e55
Merge branch 'release/6.0.1xx' into merges/main-to-release/6.0.1xx
jmarolf Apr 20, 2021
653d04d
Merge pull request #5031 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Apr 20, 2021
cdac0be
Update src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
NewellClark Apr 20, 2021
2b25aa9
Change doc link to ca1841
NewellClark Apr 20, 2021
3925794
Apply requested changes
NewellClark Apr 20, 2021
761578e
Merge branch 'release/6.0.1xx-preview4' into issue-33789
NewellClark Apr 20, 2021
a4e6374
Add newline to end of resx file
NewellClark Apr 20, 2021
f481548
Add newline character
NewellClark Apr 20, 2021
c46ba49
CA1416 fix ambiguity in Version comparison (#4943)
buyaa-n Apr 20, 2021
b8df54b
Merge branch 'release/6.0.1xx' into merges/release/6.0.1xx-preview4-t…
jmarolf Apr 20, 2021
1c73932
Merge pull request #5042 from dotnet/merges/release/6.0.1xx-preview4-…
jmarolf Apr 20, 2021
1135ad2
Merge branch 'release/6.0.1xx-preview4' into issue-35343
mavasani Apr 21, 2021
b2dc2cc
Fix garbled unshipped.md markup
NewellClark Apr 21, 2021
138ab76
Merge pull request #4687 from NewellClark/issue-35343
mavasani Apr 21, 2021
516e775
Merge branch 'release/6.0.1xx-preview4' into issue-33789
NewellClark Apr 21, 2021
719e4c5
Merge remote-tracking branch 'upstream/release/6.0.1xx-preview4' into…
ryzngard Apr 21, 2021
7285360
Add rules back to AnalyzerReleases.Unshipped
ryzngard Apr 21, 2021
0ae0ff3
Fix spacing in test
ryzngard Apr 21, 2021
1b019d6
Merge pull request #5052 from dotnet/merges/main-to-release/6.0.1xx
mavasani Apr 22, 2021
81ceec1
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Tasks/DoNotU…
ryzngard Apr 22, 2021
02947da
Update description wording
ryzngard Apr 22, 2021
dd00427
Updated documentation based on description
ryzngard Apr 22, 2021
535cbe7
Merge pull request #4841 from ryzngard/feature/task_when_wait_all_ana…
ryzngard Apr 22, 2021
e8712e8
Cleanup DoNotUseWhenAllOrWaitAllWithSingleArgument
Youssef1313 Apr 23, 2021
0b5e5c1
Another approach
Youssef1313 Apr 23, 2021
d515202
Merge pull request #5060 from Youssef1313/cleanup
ryzngard Apr 23, 2021
31b78e9
Change ID to CA1844
NewellClark Apr 23, 2021
a320e17
Merge branch 'release/6.0.1xx-preview4' into issue-33789
NewellClark Apr 23, 2021
81eda27
Fix failing CA
NewellClark Apr 23, 2021
e33c584
Merge branch 'release/6.0.1xx' into merges/main-to-release/6.0.1xx
jmarolf Apr 23, 2021
5e2cb00
Merge remote-tracking branch 'upstream/release/6.0.1xx-preview4' into…
jmarolf Apr 23, 2021
274ad2a
fixup bad merge
jmarolf Apr 23, 2021
822659c
Apply formatting changes
NewellClark Apr 23, 2021
3909593
Merge pull request #5056 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Apr 23, 2021
0e884fe
Merge branch 'release/6.0.1xx' into merges/release/6.0.1xx-preview4-t…
jmarolf Apr 23, 2021
153c628
Merge pull request #5048 from dotnet/merges/release/6.0.1xx-preview4-…
jmarolf Apr 23, 2021
760cd4a
Apply requested changes
NewellClark Apr 24, 2021
49894c3
Change ID to CA1845
NewellClark Apr 24, 2021
1cd7b98
Merge branch 'release/6.0.1xx-preview4' into use-span-based-concat-an…
NewellClark Apr 24, 2021
e4867b8
.
NewellClark Apr 24, 2021
2b71460
Rebuild xlf files to fix CI
NewellClark Apr 24, 2021
998f22f
Add analyzer and code fixer for providing a public parameterless Safe…
jkoritzinsky Apr 20, 2021
ba11cf1
Fill in the rest of the unit tests.
jkoritzinsky Apr 20, 2021
f88181e
Undo accidental file rename.
jkoritzinsky Apr 20, 2021
9a83408
PR feedback.
jkoritzinsky Apr 21, 2021
2c5a656
Update src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
jkoritzinsky Apr 21, 2021
0457275
Coalesce fixer types.
jkoritzinsky Apr 21, 2021
0a8faf8
Use alternative diagnostic location format.
jkoritzinsky Apr 21, 2021
0f0d189
Apply suggestions from code review
jkoritzinsky Apr 21, 2021
b23c5e0
Fix resources based on feedback.
jkoritzinsky Apr 21, 2021
174693a
Remove extra parameter that seems unneeded.
jkoritzinsky Apr 21, 2021
39f2d7c
Regenerate generated files.
jkoritzinsky Apr 26, 2021
c227a63
Remove periods.
jkoritzinsky Apr 26, 2021
fcbb1ad
Update xlf
jkoritzinsky Apr 26, 2021
c0fbfc1
Add additional test with larger inheritance tree.
jkoritzinsky Apr 27, 2021
dee8691
Merge pull request #5076 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Apr 29, 2021
fedf0ae
Merge pull request #5078 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Apr 30, 2021
068ae34
Merge pull request #5085 from dotnet/merges/main-to-release/6.0.1xx
jmarolf May 6, 2021
bf3e977
Change ID to CA1846
NewellClark May 8, 2021
b79616d
Merge branch 'release/6.0.1xx-preview4' into prefer-AsSpan-over-Subst…
NewellClark May 8, 2021
4cc4704
Rebuild resource files
NewellClark May 8, 2021
380d1c4
Fix CI
NewellClark May 8, 2021
1c1f94c
.
NewellClark May 8, 2021
36acacd
Force xlf update
NewellClark May 9, 2021
268acdc
Import System namespace correctly
NewellClark May 10, 2021
f10db94
Allow affirmative checks with else-clause
NewellClark May 10, 2021
688388c
Add VB test
NewellClark May 10, 2021
516079f
Merge main to release/6.0.1xx (#5090)
dotnet-bot May 11, 2021
15dd5af
CA1416 Support custom guard members annotated with guard attributes (…
buyaa-n May 12, 2021
369b057
Preserve trivia
NewellClark May 13, 2021
bcb2ec9
Merge branch 'release/6.0.1xx-preview4' into use-CancellationToken-Th…
NewellClark May 13, 2021
4d890bd
Fix CI
NewellClark May 14, 2021
a551291
Add shared attribute to fixer
NewellClark May 14, 2021
f70c6d8
Apply suggested changes
NewellClark May 17, 2021
092b95d
Update src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
NewellClark May 17, 2021
24f0017
Update src/NetAnalyzers/Core/AnalyzerReleases.Unshipped.md
NewellClark May 17, 2021
3a4b0c8
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseC…
NewellClark May 17, 2021
ea967fe
Simplify fixer
NewellClark May 17, 2021
2cc221b
Merge conflicts
buyaa-n May 17, 2021
970d7bb
Fix lint error
buyaa-n May 17, 2021
1c29307
Merge pull request #5097 from dotnet/merges/main-to-release/6.0.1xx
jmarolf May 17, 2021
78d78e9
Create files and tests
NewellClark May 17, 2021
0f43809
Merge pull request #4764 from NewellClark/use-span-based-concat-analyzer
mavasani May 18, 2021
94ee770
Use simple names in diagnostic messages
NewellClark May 18, 2021
4d7967b
Merge branch 'release/6.0.1xx' into issue-33789
NewellClark May 18, 2021
4bda814
Merge pull request #4726 from NewellClark/issue-33789
mavasani May 18, 2021
a8e5a51
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/MicrosoftNet…
NewellClark May 18, 2021
74bfc25
Apply suggested changes
NewellClark May 18, 2021
053b2c4
Merge branch 'release/6.0.1xx' into prefer-AsSpan-over-Substring-anal…
NewellClark May 18, 2021
9574d85
Run msbuild to fix CI
NewellClark May 18, 2021
f09b43e
Merge branch 'release/6.0.1xx' into use-CancellationToken-ThrowIfCanc…
NewellClark May 18, 2021
064c79b
Merge branch 'release/6.0.1xx' of github.com:dotnet/roslyn-analyzers …
jkoritzinsky May 18, 2021
c3408c7
Implement analyzer and fixer
NewellClark May 19, 2021
6e503b6
Run msbuild
NewellClark May 19, 2021
13ff0a4
Merge remote-tracking branch 'dotnet/release/6.0.1xx' into #45552-use…
NewellClark May 19, 2021
1963ab1
Fix build warnings
NewellClark May 19, 2021
db69ec2
Fix more build warnings
NewellClark May 19, 2021
3f76529
Apply suggested changes
NewellClark May 19, 2021
7883135
Restructure analyzer and fixer
NewellClark May 19, 2021
0c0d788
Run msbuild
NewellClark May 19, 2021
3376846
Merge pull request #5113 from dotnet/merges/main-to-release/6.0.1xx
jmarolf May 19, 2021
f0558eb
Update Versions.props
jmarolf May 20, 2021
2304afe
Merge pull request #5118 from dotnet/merges/main-to-release/6.0.1xx
mavasani May 20, 2021
05f8773
Apply suggestions from code review
NewellClark May 20, 2021
34274f9
Apply suggested changes
NewellClark May 20, 2021
5f5b92d
Merge remote-tracking branch 'dotnet/release/6.0.1xx' into #45552-use…
NewellClark May 20, 2021
92a247f
Merge pull request #4864 from NewellClark/use-CancellationToken-Throw…
mavasani May 20, 2021
34dc2d6
Merge branch 'release/6.0.1xx' into prefer-AsSpan-over-Substring-anal…
NewellClark May 20, 2021
579f683
Change diagnostic id to CA2251
NewellClark May 20, 2021
390f6fa
Merge remote-tracking branch 'dotnet/release/6.0.1xx' into #45552-use…
NewellClark May 20, 2021
1d505a7
Merge pull request #5119 from dotnet/merges/main-to-release/6.0.1xx
mavasani May 21, 2021
5ee4a10
Merge pull request #4806 from NewellClark/prefer-AsSpan-over-Substrin…
mavasani May 21, 2021
4f0881f
Merge branch 'release/6.0.1xx' into #45552-use-string-equals-over-str…
NewellClark May 21, 2021
019c4da
Don't access the semantic model directly inside RegisterCodeFixesAsync.
jkoritzinsky May 21, 2021
c6acedb
Use string.Empty instead of null
jkoritzinsky May 21, 2021
2371844
Apply suggested changes
NewellClark May 21, 2021
6562d14
Assert if symbols can't be loaded in fixer
NewellClark May 21, 2021
d464b5f
Merge pull request #5116 from NewellClark/#45552-use-string-equals-ov…
ryzngard May 23, 2021
483e77e
Merge branch 'release/6.0.1xx' of github.com:dotnet/roslyn-analyzers …
jkoritzinsky May 24, 2021
a43657b
Merge pull request #5043 from jkoritzinsky/safehandle-analyzer-and-fixer
mavasani May 24, 2021
5078028
[CA1416] Targeted build attributes can be overriden in cross platform…
buyaa-n May 27, 2021
cb17df3
Implement CA1847 - Use string.Contains(char) whenever possible
MeikTranel May 29, 2021
6db81f2
Merge pull request #4908 from MeikTranel/StringContainsCodeFix
mavasani Jun 1, 2021
0c66366
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
jmarolf Jun 19, 2021
98989fd
Update Versions.props
jmarolf Jun 19, 2021
710e6c5
Update Versions.props
jmarolf Jun 19, 2021
e0be380
Merge branch 'release/6.0.1xx' into merges/release/6.0.1xx-preview7-t…
jmarolf Jun 20, 2021
ffbc0f1
Merge pull request #5121 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Jun 20, 2021
fcddb77
Merge pull request #5156 from dotnet/merges/release/6.0.1xx-preview7-…
jmarolf Jun 20, 2021
c801eb6
Merge pull request #5164 from dotnet/merges/main-to-release/6.0.1xx
mavasani Jun 24, 2021
964d9d9
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
jmarolf Jul 1, 2021
6dcd58e
fixup merge conflicts
jmarolf Jul 1, 2021
3d710d4
fixing errors given by the test framework about editorconfig files be…
jmarolf Jul 1, 2021
ac63f73
Merge pull request #5167 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Jul 1, 2021
1385777
Merge pull request #5196 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Jul 2, 2021
d0234bc
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
jmarolf Jul 6, 2021
19faf78
update baseline for 6.0.x
jmarolf Jul 6, 2021
77c6f07
Merge pull request #5204 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Jul 6, 2021
c8fb50f
Merge remote-tracking branch 'upstream/main' into merges/main-to-rele…
jmarolf Jul 11, 2021
5e66ca8
Merge pull request #5211 from dotnet/merges/main-to-release/6.0.1xx
jmarolf Jul 11, 2021
1e2ab23
Analyzer to detect RequiresPreviewFeatures attribute (#5155)
Jul 12, 2021
7e82240
Merge pull request #5249 from dotnet/merges/main-to-release/6.0.1xx
dotnet-bot Jul 16, 2021
dad58d5
Remove dead code in CA1069 analyzer (#5253)
RikkiGibson Jul 19, 2021
602fa2c
Delete IDE dispose analyzer rules
xtqqczze Jul 19, 2021
0916e5f
CA1839 analyzer started
steveberdy Aug 17, 2021
a7c910e
CA1839 fixer code action added
steveberdy Jul 26, 2021
a3e52bc
Edits to AvoidConstArrays.Fixer.cs
steveberdy Jul 26, 2021
dd7d8fa
Fixed roslyn warnings
steveberdy Jul 27, 2021
7d77c01
Debugged to properly create the diagnostic
steveberdy Aug 3, 2021
775d81c
Remove some empty statements
Evangelink Jul 22, 2021
478d064
Initial add of richnav indexing
brianaeng Jul 20, 2021
6ed614c
Update yml spacing
brianaeng Jul 20, 2021
eb4f6f5
Remove unauthorized settings
brianaeng Jul 20, 2021
5199ffe
Update pool
brianaeng Jul 20, 2021
4c87a2e
Attempt to fix test step in build pipeline
brianaeng Jul 22, 2021
f29e807
Add richnav nuget source
brianaeng Jul 22, 2021
e570e6b
RichNav run worked in main yml -- removing from there and copying it …
brianaeng Jul 22, 2021
c6b009c
Remove added whitespace
brianaeng Jul 22, 2021
bee6492
Remove unused vars, rename displayName for clarity
brianaeng Jul 22, 2021
b264852
Loc/zh-hans: 过载 -> 重载
imba-tjd Jun 19, 2021
e539d7d
Install vs-threading analyzers
sharwell Jul 26, 2021
128c94e
Update RelaxTestNamingSuppressor to recognize BenchmarkAttribute
sharwell Jul 26, 2021
54c8c41
Add missing FactAttribute
sharwell Jul 26, 2021
d302777
update headers
jmarolf Jul 28, 2021
66cb185
Refactor tests to use non-obselete location API
Evangelink Jul 29, 2021
35ad7ce
handle params array in the argument list
jmarolf May 1, 2021
3651a9f
Update src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime…
jmarolf May 3, 2021
db392cc
remove unused parameters
jmarolf May 3, 2021
04bc47f
rename types
jmarolf May 3, 2021
41a0a2c
rename files
jmarolf May 3, 2021
73edf91
manually contruct array in VB case
jmarolf May 3, 2021
e10120a
remove unused using
jmarolf May 3, 2021
492a901
remove blank line
jmarolf May 3, 2021
2a5378f
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/Forw…
jmarolf Jun 4, 2021
4fe999d
fixing formatting
jmarolf Jul 17, 2021
23ae553
update headers
jmarolf Aug 2, 2021
77cb72a
use preview language version
jmarolf Aug 2, 2021
abe363c
prefer `is not null` to `is object`
jmarolf Aug 2, 2021
b87a9f3
fixup rebase
jmarolf Aug 2, 2021
0947751
Update license headers in analyzer and tests
steveberdy Aug 3, 2021
e8f8f70
Remove half-checked-in submodule.
crummel Aug 3, 2021
5eaffda
Added comments and more unit tests
steveberdy Aug 3, 2021
9b36c18
Update csharp unit tests for analyzer
steveberdy Aug 3, 2021
790f06b
Drafted code fixer and added unit tests
steveberdy Aug 4, 2021
c3a4cff
Update VerifyCS and VerifyVB aliases to include the fixer class
steveberdy Aug 5, 2021
0ef4bec
Update code fix tests
steveberdy Aug 5, 2021
d6eb2f7
Update VB test code
steveberdy Aug 5, 2021
73d9891
Clean up extract method
steveberdy Aug 6, 2021
a19dc91
Refactored ISymbol.GetContainingMethod as an extension method
steveberdy Aug 6, 2021
e331702
Refactored extraction call
steveberdy Aug 6, 2021
5ff9719
[refactor] test's location
get-me-power Aug 5, 2021
af26d85
[delete] Test's api
get-me-power Aug 5, 2021
38c924c
Update src/Microsoft.CodeAnalysis.BannedApiAnalyzers/UnitTests/Symbol…
get-me-power Aug 5, 2021
8fd73a9
[fix] code style
get-me-power Aug 5, 2021
2d2a8c0
Added operation kinds for operation registration
steveberdy Aug 10, 2021
061417f
Improved analyzer and code fixer
steveberdy Aug 13, 2021
354228f
Analyzer and code fix draft completed
steveberdy Aug 16, 2021
5cf0884
Refactor or conditions in DoNotUseInsecureDtdProcessingAnalyzer
Evangelink Jul 28, 2021
82a9cf1
Cleaned code for more performance
steveberdy Aug 16, 2021
6631760
More code cleanup
steveberdy Aug 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion

# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones.
dotnet_diagnostic.IDE0067.severity = none
dotnet_diagnostic.IDE0068.severity = none
dotnet_diagnostic.IDE0069.severity = none

### CSharp code style settings ###
[*.cs]

Expand Down Expand Up @@ -276,3 +271,12 @@ dotnet_diagnostic.CA1309.severity = suggestion

# Analyzers bail-out if the PublicAPI.*.txt file is not found
dotnet_public_api_analyzer.require_api_files = true

### Configuration for vs-threading analyzers executed on this repo ###
[*.{cs,vb}]

# VSTHRD002: Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = none

# VSTHRD011: Use AsyncLazy<T>
dotnet_diagnostic.VSTHRD011.severity = none
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

Expand Down
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<!-- Used for Rich Navigation indexing task -->
<add key="richnav" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
28 changes: 28 additions & 0 deletions azure-pipelines-richnav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Branches that trigger a build on commit
trigger:
- main
- release/*

stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableRichCodeNavigation: true
richCodeNavigationEnvironment: "production"
richCodeNavigationLanguage: "csharp"
jobs:
- job: Debug_Build
pool:
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open
variables:
- name: _BuildConfig
value: Debug
steps:
- checkout: self
clean: true
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
displayName: Build and Index
2 changes: 1 addition & 1 deletion eng/AfterSolutionBuild.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>

<Target Name="ReportCodeCoverage" AfterTargets="Test" Condition="'$(Configuration)' == 'Debug' and '$(CODECOV_TOKEN)' != ''">
Expand Down
4 changes: 2 additions & 2 deletions eng/GenerateAnalyzerNuspec.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
Expand All @@ -19,7 +19,7 @@
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
<CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<PackageLicenseExpression Condition="'$(PackageLicenseExpression)' == ''">Apache-2.0</PackageLicenseExpression>
<PackageLicenseExpression Condition="'$(PackageLicenseExpression)' == ''">MIT</PackageLicenseExpression>
</PropertyGroup>

<PropertyGroup>
Expand Down
5 changes: 3 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<VersionPrefix>3.3.3</VersionPrefix>
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
<NetAnalyzersVersionPrefix>5.0.4</NetAnalyzersVersionPrefix>
<NetAnalyzersPreReleaseVersionLabel>preview1</NetAnalyzersPreReleaseVersionLabel>
<NetAnalyzersVersionPrefix>6.0.0</NetAnalyzersVersionPrefix>
<NetAnalyzersPreReleaseVersionLabel>rc1</NetAnalyzersPreReleaseVersionLabel>
<AnalyzerUtilitiesVersionPrefix>$(VersionPrefix)</AnalyzerUtilitiesVersionPrefix>
<!--
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
Expand Down Expand Up @@ -39,6 +39,7 @@
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>$(DogfoodAnalyzersVersion)</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<RoslynDiagnosticsAnalyzersVersion>$(DogfoodAnalyzersVersion)</RoslynDiagnosticsAnalyzersVersion>
<MicrosoftCodeAnalysisTestResourcesProprietaryVersion>2.0.0-pre-20160714</MicrosoftCodeAnalysisTestResourcesProprietaryVersion>
<MicrosoftVisualStudioThreadingAnalyzersVersion>17.0.26-alpha</MicrosoftVisualStudioThreadingAnalyzersVersion>
<!-- Roslyn Testing -->
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.21202.2</MicrosoftCodeAnalysisTestingVersion>
<!-- Libs -->
Expand Down
2 changes: 1 addition & 1 deletion eng/common/internal/Tools.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
Expand Down
2 changes: 1 addition & 1 deletion eng/perf/baseline.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"release": "6.0",
"label": "roslyn analyzers baseline for main",
"sha": "f71538a0935809fdc9b6dd17046f86809a231109"
"sha": "1385777776d6393704fa8eb61c18d7fa8cfcff81"
}
2 changes: 1 addition & 1 deletion nuget/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<Import Project="..\Directory.Build.targets" />
<Import Project="$(RepoRoot)eng\GenerateAnalyzerNuspec.targets" Condition="'$(IsPackable)' == 'true'"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<PropertyGroup>
<MetricsExeFolder>$(MSBuildThisFileDirectory)\..\Metrics</MetricsExeFolder>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
2 changes: 1 addition & 1 deletion nuget/Text.Analyzers/Text.Analyzers.Package.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<Import Project="..\Directory.Build.props"/>

Expand Down Expand Up @@ -39,6 +39,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="$(MicrosoftCodeAnalysisAnalyzersVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers" Version="$(MicrosoftCodeAnalysisPerformanceSensitiveAnalyzersVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="$(MicrosoftVisualStudioThreadingAnalyzersVersion)" />
<PackageReference Include="Roslyn.Diagnostics.Analyzers" Version="$(RoslynDiagnosticsAnalyzersVersion)" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>

<!--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project>
<Import Project="..\Directory.Build.props"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="41880BF7-B087-402F-AE29-18A367E9DF9B" Version="|%CurrentProject%;GetVsixVersion|" Language="en-US" Publisher="Microsoft DevLabs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="7ba185fb-b7f2-4015-bc49-576b2266193e" Version="|%CurrentProject%;GetVsixVersion|" Language="en-US" Publisher="Microsoft DevLabs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
Expand Down
Loading