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

New rule S6444: RegEx evaluation should have a time out specified #5693

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5cc9d25
Specify MatchTimeout on regex.
Jul 4, 2022
832800b
Support .NET 7 NonBacktracking option.
Jul 7, 2022
da0b398
Update analyzers/src/SonarAnalyzer.Common/Rules/SpecifyTimeoutOnRegex…
Jul 12, 2022
5fcf3d5
Small changes.
Jul 12, 2022
f38f7e6
Add test cases.
Jul 12, 2022
b59f0e7
Add precise pattern.
Jul 12, 2022
dd57a03
scan InvocationExpressions not Identifier names.
Jul 12, 2022
630304a
remove unused using statement.
Jul 12, 2022
e946d3d
Update analyzers/src/SonarAnalyzer.CSharp/Facade/CSharpFacade.cs
Jul 12, 2022
a81857d
last issues.
Jul 12, 2022
cb0b031
Update analyzers/src/SonarAnalyzer.Common/Rules/SpecifyTimeoutOnRegex…
Jul 13, 2022
c665d93
Select on parameter name instead.
Jul 13, 2022
f3856ac
Update analyzers/src/SonarAnalyzer.Common/Rules/SpecifyTimeoutOnRegex…
Jul 13, 2022
4408fcf
Be defensive on special case of method node lacking an identifier.
Jul 14, 2022
b4abe05
Update analyzers/tests/SonarAnalyzer.UnitTest/TestCases/SpecifyTimeou…
Jul 15, 2022
6e92ea7
Add RegularExpressionAttribute examples as reminder that these contai…
Oct 4, 2022
a5fbee5
Updated DiagnosticId
Oct 4, 2022
093d25e
Update analyzers/tests/SonarAnalyzer.UnitTest/TestCases/SpecifyTimeou…
Nov 26, 2022
2afe28a
Remove global used namespaces.
Nov 26, 2022
0064d4b
Update rspec
martin-strecker-sonarsource Nov 28, 2022
9d6ed2d
Fix rule mappings
martin-strecker-sonarsource Nov 28, 2022
8e65796
Move files to "Hotspots" folder
martin-strecker-sonarsource Nov 28, 2022
f085a9b
Add GetAdditionalReferences for SpecifyTimeoutOnRegex
martin-strecker-sonarsource Nov 28, 2022
b79ba3e
Fix UTs
martin-strecker-sonarsource Nov 28, 2022
2bfb41a
Formatting
martin-strecker-sonarsource Nov 28, 2022
ae1bb2b
Update ITs Nancy
martin-strecker-sonarsource Nov 28, 2022
2dc14d7
Update ITs Automapper
martin-strecker-sonarsource Nov 28, 2022
53febc1
Update ITs Ember-MM
martin-strecker-sonarsource Nov 28, 2022
2080096
Update ITs akka
martin-strecker-sonarsource Nov 28, 2022
02e651e
Fix code smells
martin-strecker-sonarsource Nov 28, 2022
72d63a9
Remove uncovered syntaxkinds from ArgumentExpressions
martin-strecker-sonarsource Dec 14, 2022
d62ae2c
Add tests for CSharpFacade.MethodParameterLookup
martin-strecker-sonarsource Dec 14, 2022
18ee252
Fix message assertion for NET48
martin-strecker-sonarsource Dec 14, 2022
aa17d8c
Add tests for VisualBasicFacade.MethodParameterLookup
martin-strecker-sonarsource Dec 14, 2022
5778b3b
Fix filename
martin-strecker-sonarsource Dec 14, 2022
588d385
Update rspec
martin-strecker-sonarsource Dec 15, 2022
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
30 changes: 30 additions & 0 deletions analyzers/its/expected/Automapper/AutoMapper--net461-S6444.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"issues": [
{
"id": "S6444",
"message": "Pass a timeout to limit the execution time.",
"location": {
"uri": "sources\Automapper\src\AutoMapper\Configuration\INamingConvention.cs",
"region": {
"startLine": 25,
"startColumn": 52,
"endLine": 25,
"endColumn": 118
}
}
},
{
"id": "S6444",
"message": "Pass a timeout to limit the execution time.",
"location": {
"uri": "sources\Automapper\src\AutoMapper\Configuration\INamingConvention.cs",
"region": {
"startLine": 33,
"startColumn": 57,
"endLine": 33,
"endColumn": 95
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"issues": [
{
"id": "S6444",
"message": "Pass a timeout to limit the execution time.",
"location": {
"uri": "sources\Automapper\src\AutoMapper\Configuration\INamingConvention.cs",
"region": {
"startLine": 25,
"startColumn": 52,
"endLine": 25,
"endColumn": 118
}
}
},
{
"id": "S6444",
"message": "Pass a timeout to limit the execution time.",
"location": {
"uri": "sources\Automapper\src\AutoMapper\Configuration\INamingConvention.cs",
"region": {
"startLine": 33,
"startColumn": 57,
"endLine": 33,
"endColumn": 95
}
}
}
]
}
Loading