Skip to content

Commit 6bcc157

Browse files
committed
qodana
1 parent b0d0ad1 commit 6bcc157

File tree

2 files changed

+70
-68
lines changed

2 files changed

+70
-68
lines changed

qodana.yaml

Lines changed: 69 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,79 +7,81 @@ version: "1.0"
77
ide: QDNET
88
#Specify inspection profile for code analysis
99
profile:
10-
name: qodana.starter
10+
name: qodana.starter
1111
include:
12-
- name: ConvertIfStatementToReturnStatement
13-
- name: ConvertIfStatementToConditionalTernaryExpression
14-
- name: AutoPropertyCanBeMadeGetOnly.Global
15-
- name: CanReplaceCastWithLambdaReturnType
16-
- name: ChangeFieldTypeToSystemThreadingLock
17-
- name: ConvertIfStatementToSwitchStatement
18-
- name: ConvertToConstant.Local
19-
- name: DuplicatedSequentialIfBodies
20-
- name: InlineTemporaryVariable
21-
- name: InvertIf
22-
- name: UseVerbatimString
23-
- name: MemberCanBePrivate.Global
24-
- name: MemberCanBeProtected.Global
25-
- name: MergeIntoPattern
26-
- name: UnusedMethodReturnValue.Global
27-
- name: EditorConfigNoMatchingFiles
28-
- name: PreferConcreteValueOverDefault
29-
- name: PropertyCanBeMadeInitOnly.Global
30-
- name: MoveLocalFunctionAfterJumpStatement
31-
- name: RedundantExplicitParamsArrayCreation
32-
- name: RedundantOverload.Global
33-
- name: RedundantStringInterpolation
34-
- name: RedundantVerbatimStringPrefix
35-
- name: ReplaceSubstringWithRangeIndexer
36-
- name: RCS1001
37-
- name: RCS1003
38-
- name: RCS1123
39-
- name: SYSLIB1045
40-
- name: CA1826
41-
- name: RCS1256
42-
- name: RCS1118
43-
- name: RCS1077
44-
- name: RCS1205
45-
- name: RCS1214
46-
- name: RCS1249
47-
- name: RCS1192
48-
- name: SYSLIB1054
49-
- name: CA1512
50-
- name: CA1866
51-
- name: CA1859
52-
- name: RCS1246
53-
- name: CA1829
54-
- name: RCS1266
55-
- name: RCS1267
56-
- name: RCS1227
57-
- name: SwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault
58-
- name: SwitchStatementHandlesSomeKnownEnumValuesWithDefault
59-
- name: RedundantAlwaysMatchSubpattern
60-
- name: UnusedType.Global
61-
- name: UnusedMemberInSuper.Global
62-
- name: UnusedMember.Local
63-
- name: EditorConfigKeyCorrectness
64-
- name: UseCollectionCountProperty
65-
- name: UseDiscardAssignment
66-
- name: ArrangeNamespaceBody
67-
- name: SuggestDiscardDeclarationVarStyle
68-
- name: ArrangeTrailingCommaInMultilineLists
69-
- name: ArrangeObjectCreationWhenTypeNotEvident
70-
- name: UseRawString
71-
- name: VirtualMemberNeverOverridden.Global
72-
- name: ArrangeVarKeywordsInDeconstructingDeclaration
73-
- name: SuggestVarOrType_BuiltInTypes
12+
- name: ConvertIfStatementToReturnStatement
13+
- name: ConvertIfStatementToConditionalTernaryExpression
14+
- name: AutoPropertyCanBeMadeGetOnly.Global
15+
- name: CanReplaceCastWithLambdaReturnType
16+
- name: ChangeFieldTypeToSystemThreadingLock
17+
- name: ConvertIfStatementToSwitchStatement
18+
- name: ConvertToConstant.Local
19+
- name: DuplicatedSequentialIfBodies
20+
- name: InlineTemporaryVariable
21+
- name: InvertIf
22+
- name: UseVerbatimString
23+
- name: MemberCanBePrivate.Global
24+
- name: MemberCanBeProtected.Global
25+
- name: MergeIntoPattern
26+
- name: UnusedMethodReturnValue.Global
27+
- name: EditorConfigNoMatchingFiles
28+
- name: PreferConcreteValueOverDefault
29+
- name: PropertyCanBeMadeInitOnly.Global
30+
- name: MoveLocalFunctionAfterJumpStatement
31+
- name: RedundantExplicitParamsArrayCreation
32+
- name: RedundantOverload.Global
33+
- name: RedundantStringInterpolation
34+
- name: RedundantVerbatimStringPrefix
35+
- name: ReplaceSubstringWithRangeIndexer
36+
- name: RCS1001
37+
- name: RCS1003
38+
- name: RCS1123
39+
- name: SYSLIB1045
40+
- name: CA1826
41+
- name: RCS1256
42+
- name: RCS1118
43+
- name: RCS1077
44+
- name: RCS1205
45+
- name: RCS1214
46+
- name: RCS1249
47+
- name: RCS1192
48+
- name: SYSLIB1054
49+
- name: CA1512
50+
- name: CA1866
51+
- name: CA1859
52+
- name: RCS1246
53+
- name: CA1829
54+
- name: RCS1266
55+
- name: RCS1267
56+
- name: RCS1227
57+
- name: SwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault
58+
- name: SwitchStatementHandlesSomeKnownEnumValuesWithDefault
59+
- name: RedundantAlwaysMatchSubpattern
60+
- name: UnusedType.Global
61+
- name: UnusedMemberInSuper.Global
62+
- name: UnusedMember.Local
63+
- name: EditorConfigKeyCorrectness
64+
- name: UseCollectionCountProperty
65+
- name: UseDiscardAssignment
66+
- name: ArrangeNamespaceBody
67+
- name: SuggestDiscardDeclarationVarStyle
68+
- name: ArrangeTrailingCommaInMultilineLists
69+
- name: ArrangeObjectCreationWhenTypeNotEvident
70+
- name: UseRawString
71+
- name: VirtualMemberNeverOverridden.Global
72+
- name: ArrangeVarKeywordsInDeconstructingDeclaration
73+
- name: SuggestVarOrType_BuiltInTypes
7474
#Enable inspections
7575
#include:
7676
# - name: <SomeEnabledInspectionId>
7777
#Disable inspections
7878
exclude:
79-
- name: ConvertIfStatementToConditionalTernaryExpression
80-
paths:
81-
- GitVersion.Core.Tests/IntegrationTests/AlignGitFlowWithMainlineVersionStrategy.cs
82-
- GitVersion.Core.Tests/IntegrationTests/AlignGitHubFlowWithMainlineVersionStrategy.cs
79+
- name: LoopCanBeConvertedToQuery
80+
- name: ForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumerator
81+
- name: ConvertIfStatementToConditionalTernaryExpression
82+
paths:
83+
- GitVersion.Core.Tests/IntegrationTests/AlignGitFlowWithMainlineVersionStrategy.cs
84+
- GitVersion.Core.Tests/IntegrationTests/AlignGitHubFlowWithMainlineVersionStrategy.cs
8385
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
8486
bootstrap: dotnet build src/GitVersion.slnx
8587
dotnet:

src/GitVersion.Core/Core/SourceBranchFinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public bool IsSourceBranch(INamedReference sourceBranchCandidate)
3434
private static IEnumerable<Regex> GetSourceBranchRegexes(INamedReference branch, IGitVersionConfiguration configuration)
3535
{
3636
var currentBranchConfig = configuration.GetBranchConfiguration(branch.Name);
37-
if (currentBranchConfig.SourceBranches == null)
37+
if (currentBranchConfig is { SourceBranches: null })
3838
{
3939
yield return RegexPatterns.Cache.GetOrAdd(".*");
4040
}

0 commit comments

Comments
 (0)