Skip to content

Commit 28ad453

Browse files
committed
fixes
1 parent e5f0f14 commit 28ad453

File tree

29 files changed

+106
-101
lines changed

29 files changed

+106
-101
lines changed

.editorconfig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
154154
csharp_space_between_method_declaration_parameter_list_parentheses = false
155155
csharp_space_between_square_brackets = false
156156

157-
csharp_use_roslyn_logic_for_evident_types = true
157+
resharper_csharp_use_roslyn_logic_for_evident_types = true
158158

159159
# Alignment
160-
align_multiline_parameter = true
160+
resharper_csharp_align_multiline_parameter = true
161161

162162
# Qualify fields with "this."
163-
csharp_instance_members_qualify_members = field
163+
resharper_csharp_instance_members_qualify_members = field
164164

165165
# IDE0011: Add braces
166166
dotnet_diagnostic.IDE0011.severity = none
@@ -197,4 +197,8 @@ dotnet_diagnostic.RCS1036.severity = error
197197

198198
xml_space_before_self_closing = true
199199

200-
resharper_arrange_object_creation_when_type_not_evident_highlighting = none
200+
resharper_arrange_object_creation_when_type_not_evident_highlighting = none
201+
202+
resharper_unused_auto_property_accessor_global_highlighting = none
203+
204+
resharper_unused_method_return_value_global_highlighting = none

src/GitVersion.App.Tests/HelpWriterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void AllArgsAreInHelp()
5151
.ShouldBeEmpty();
5252
}
5353

54-
private static bool IsNotInHelp(IReadOnlyDictionary<string, string> lookup, string propertyName, string helpText)
54+
private static bool IsNotInHelp(Dictionary<string, string> lookup, string propertyName, string helpText)
5555
{
5656
if (lookup.TryGetValue(propertyName, out var value))
5757
return !helpText.Contains(value);

src/GitVersion.App.Tests/Helpers/ProgramFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace GitVersion.App.Tests;
77

88
public sealed class ProgramFixture
99
{
10-
private readonly IEnvironment environment;
10+
private readonly TestEnvironment environment;
1111
private List<Action<IServiceCollection>> Overrides { get; } = [];
1212
private readonly Lazy<string> logger;
1313
private readonly Lazy<string?> output;
@@ -49,7 +49,7 @@ public void WithEnv(params KeyValuePair<string, string>[] envs)
4949

5050
public Task<ExecutionResults> Run(string arg)
5151
{
52-
var args = arg.Split([' '], StringSplitOptions.RemoveEmptyEntries).ToArray();
52+
var args = arg.Split([' '], StringSplitOptions.RemoveEmptyEntries);
5353
return Run(args);
5454
}
5555

src/GitVersion.App/ArgumentParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,14 @@ private static void EnsureArgumentValueCount(IReadOnlyList<string>? values)
562562
}
563563
}
564564

565-
private static NameValueCollection CollectSwitchesAndValuesFromArguments(IList<string> namedArguments, out bool firstArgumentIsSwitch)
565+
private static NameValueCollection CollectSwitchesAndValuesFromArguments(string[] namedArguments, out bool firstArgumentIsSwitch)
566566
{
567567
firstArgumentIsSwitch = true;
568568
var switchesAndValues = new NameValueCollection();
569569
string? currentKey = null;
570570
var argumentRequiresValue = false;
571571

572-
for (var i = 0; i < namedArguments.Count; ++i)
572+
for (var i = 0; i < namedArguments.Length; ++i)
573573
{
574574
var arg = namedArguments[i];
575575

src/GitVersion.BuildAgents/Agents/MyGet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public override string[] SetOutputVariables(string name, string? value)
2828
return [.. messages];
2929
}
3030

31-
public override string? SetBuildNumber(GitVersionVariables variables) =>
31+
public override string SetBuildNumber(GitVersionVariables variables) =>
3232
$"##myget[buildNumber '{ServiceMessageEscapeHelper.EscapeValue(variables.FullSemVer)}']";
3333

3434
public override bool PreventFetch() => false;

src/GitVersion.Configuration/Builders/ConfigurationBuilderBase.cs

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -100,232 +100,232 @@ protected ConfigurationBuilderBase()
100100
}
101101
}
102102

103-
public virtual TConfigurationBuilder WithAssemblyVersioningScheme(AssemblyVersioningScheme? value)
103+
public TConfigurationBuilder WithAssemblyVersioningScheme(AssemblyVersioningScheme? value)
104104
{
105105
this.assemblyVersioningScheme = value;
106106
return (TConfigurationBuilder)this;
107107
}
108108

109-
public virtual TConfigurationBuilder WithAssemblyFileVersioningScheme(AssemblyFileVersioningScheme? value)
109+
public TConfigurationBuilder WithAssemblyFileVersioningScheme(AssemblyFileVersioningScheme? value)
110110
{
111111
this.assemblyFileVersioningScheme = value;
112112
return (TConfigurationBuilder)this;
113113
}
114114

115-
public virtual TConfigurationBuilder WithAssemblyInformationalFormat(string? value)
115+
public TConfigurationBuilder WithAssemblyInformationalFormat(string? value)
116116
{
117117
this.assemblyInformationalFormat = value;
118118
return (TConfigurationBuilder)this;
119119
}
120120

121-
public virtual TConfigurationBuilder WithAssemblyVersioningFormat(string? value)
121+
public TConfigurationBuilder WithAssemblyVersioningFormat(string? value)
122122
{
123123
this.assemblyVersioningFormat = value;
124124
return (TConfigurationBuilder)this;
125125
}
126126

127-
public virtual TConfigurationBuilder WithAssemblyFileVersioningFormat(string? value)
127+
public TConfigurationBuilder WithAssemblyFileVersioningFormat(string? value)
128128
{
129129
this.assemblyFileVersioningFormat = value;
130130
return (TConfigurationBuilder)this;
131131
}
132132

133-
public virtual TConfigurationBuilder WithTagPrefixPattern(string? value)
133+
public TConfigurationBuilder WithTagPrefixPattern(string? value)
134134
{
135135
this.tagPrefix = value;
136136
return (TConfigurationBuilder)this;
137137
}
138138

139-
public virtual TConfigurationBuilder WithVersionInBranchPattern(string? value)
139+
public TConfigurationBuilder WithVersionInBranchPattern(string? value)
140140
{
141141
this.versionInBranchPattern = value;
142142
return (TConfigurationBuilder)this;
143143
}
144144

145-
public virtual TConfigurationBuilder WithNextVersion(string? value)
145+
public TConfigurationBuilder WithNextVersion(string? value)
146146
{
147147
this.nextVersion = value;
148148
return (TConfigurationBuilder)this;
149149
}
150150

151-
public virtual TConfigurationBuilder WithMajorVersionBumpMessage(string? value)
151+
public TConfigurationBuilder WithMajorVersionBumpMessage(string? value)
152152
{
153153
this.majorVersionBumpMessage = value;
154154
return (TConfigurationBuilder)this;
155155
}
156156

157-
public virtual TConfigurationBuilder WithMinorVersionBumpMessage(string? value)
157+
public TConfigurationBuilder WithMinorVersionBumpMessage(string? value)
158158
{
159159
this.minorVersionBumpMessage = value;
160160
return (TConfigurationBuilder)this;
161161
}
162162

163-
public virtual TConfigurationBuilder WithPatchVersionBumpMessage(string? value)
163+
public TConfigurationBuilder WithPatchVersionBumpMessage(string? value)
164164
{
165165
this.patchVersionBumpMessage = value;
166166
return (TConfigurationBuilder)this;
167167
}
168168

169-
public virtual TConfigurationBuilder WithNoBumpMessage(string? value)
169+
public TConfigurationBuilder WithNoBumpMessage(string? value)
170170
{
171171
this.noBumpMessage = value;
172172
return (TConfigurationBuilder)this;
173173
}
174174

175-
public virtual TConfigurationBuilder WithTagPreReleaseWeight(int? value)
175+
public TConfigurationBuilder WithTagPreReleaseWeight(int? value)
176176
{
177177
this.tagPreReleaseWeight = value;
178178
return (TConfigurationBuilder)this;
179179
}
180180

181-
public virtual TConfigurationBuilder WithIgnoreConfiguration(IIgnoreConfiguration value)
181+
public TConfigurationBuilder WithIgnoreConfiguration(IIgnoreConfiguration value)
182182
{
183183
this.ignore = (IgnoreConfiguration)value;
184184
return (TConfigurationBuilder)this;
185185
}
186186

187-
public virtual TConfigurationBuilder WithCommitDateFormat(string? value)
187+
public TConfigurationBuilder WithCommitDateFormat(string? value)
188188
{
189189
this.commitDateFormat = value;
190190
return (TConfigurationBuilder)this;
191191
}
192192

193-
public virtual TConfigurationBuilder WithUpdateBuildNumber(bool value)
193+
public TConfigurationBuilder WithUpdateBuildNumber(bool value)
194194
{
195195
this.updateBuildNumber = value;
196196
return (TConfigurationBuilder)this;
197197
}
198198

199-
public virtual TConfigurationBuilder WithSemanticVersionFormat(SemanticVersionFormat value)
199+
public TConfigurationBuilder WithSemanticVersionFormat(SemanticVersionFormat value)
200200
{
201201
this.semanticVersionFormat = value;
202202
return (TConfigurationBuilder)this;
203203
}
204204

205-
public virtual TConfigurationBuilder WithVersionStrategy(VersionStrategies value)
205+
public TConfigurationBuilder WithVersionStrategy(VersionStrategies value)
206206
{
207207
this.versionStrategies = Enum.GetValues<VersionStrategies>()
208208
.Where(element => element != VersionStrategies.None && value.HasFlag(element))
209209
.ToArray();
210210
return (TConfigurationBuilder)this;
211211
}
212212

213-
public virtual TConfigurationBuilder WithVersionStrategies(params VersionStrategies[] values)
213+
public TConfigurationBuilder WithVersionStrategies(params VersionStrategies[] values)
214214
{
215215
this.versionStrategies = values;
216216
return (TConfigurationBuilder)this;
217217
}
218218

219-
public virtual TConfigurationBuilder WithMergeMessageFormats(IReadOnlyDictionary<string, string> value)
219+
public TConfigurationBuilder WithMergeMessageFormats(IReadOnlyDictionary<string, string> value)
220220
{
221221
this.mergeMessageFormats = new(value);
222222
return (TConfigurationBuilder)this;
223223
}
224224

225-
public virtual TConfigurationBuilder WithoutBranches()
225+
public TConfigurationBuilder WithoutBranches()
226226
{
227227
this.branchConfigurationBuilders.Clear();
228228
return (TConfigurationBuilder)this;
229229
}
230230

231-
public virtual BranchConfigurationBuilder WithBranch(string value)
231+
public BranchConfigurationBuilder WithBranch(string value)
232232
=> this.branchConfigurationBuilders.GetOrAdd(value, () => BranchConfigurationBuilder.New);
233233

234-
public virtual BranchConfigurationBuilder WithBranch(string value, BranchConfigurationBuilder builder)
234+
public BranchConfigurationBuilder WithBranch(string value, BranchConfigurationBuilder builder)
235235
=> this.branchConfigurationBuilders.GetOrAdd(value, () => builder);
236236

237-
public virtual TConfigurationBuilder WithBranch(string value, Action<BranchConfigurationBuilder> action)
237+
public TConfigurationBuilder WithBranch(string value, Action<BranchConfigurationBuilder> action)
238238
{
239239
var result = this.branchConfigurationBuilders.GetOrAdd(value, () => BranchConfigurationBuilder.New);
240240
action(result);
241241
return (TConfigurationBuilder)this;
242242
}
243243

244-
public virtual TConfigurationBuilder WithDeploymentMode(DeploymentMode? value)
244+
public TConfigurationBuilder WithDeploymentMode(DeploymentMode? value)
245245
{
246246
this.versioningMode = value;
247247
return (TConfigurationBuilder)this;
248248
}
249249

250-
public virtual TConfigurationBuilder WithLabel(string? value)
250+
public TConfigurationBuilder WithLabel(string? value)
251251
{
252252
this.label = value;
253253
return (TConfigurationBuilder)this;
254254
}
255255

256-
public virtual TConfigurationBuilder WithIncrement(IncrementStrategy value)
256+
public TConfigurationBuilder WithIncrement(IncrementStrategy value)
257257
{
258258
this.increment = value;
259259
return (TConfigurationBuilder)this;
260260
}
261261

262-
public virtual TConfigurationBuilder WithPreventIncrementOfMergedBranch(bool? value)
262+
public TConfigurationBuilder WithPreventIncrementOfMergedBranch(bool? value)
263263
{
264264
this.preventIncrementOfMergedBranch = value;
265265
return (TConfigurationBuilder)this;
266266
}
267267

268-
public virtual TConfigurationBuilder WithPreventIncrementWhenBranchMerged(bool? value)
268+
public TConfigurationBuilder WithPreventIncrementWhenBranchMerged(bool? value)
269269
{
270270
this.preventIncrementWhenBranchMerged = value;
271271
return (TConfigurationBuilder)this;
272272
}
273273

274-
public virtual TConfigurationBuilder WithPreventIncrementWhenCurrentCommitTagged(bool? value)
274+
public TConfigurationBuilder WithPreventIncrementWhenCurrentCommitTagged(bool? value)
275275
{
276276
this.preventIncrementWhenCurrentCommitTagged = value;
277277
return (TConfigurationBuilder)this;
278278
}
279279

280-
public virtual TConfigurationBuilder WithTrackMergeTarget(bool? value)
280+
public TConfigurationBuilder WithTrackMergeTarget(bool? value)
281281
{
282282
this.trackMergeTarget = value;
283283
return (TConfigurationBuilder)this;
284284
}
285285

286-
public virtual TConfigurationBuilder WithTrackMergeMessage(bool? value)
286+
public TConfigurationBuilder WithTrackMergeMessage(bool? value)
287287
{
288288
this.trackMergeMessage = value;
289289
return (TConfigurationBuilder)this;
290290
}
291291

292-
public virtual TConfigurationBuilder WithCommitMessageIncrementing(CommitMessageIncrementMode? value)
292+
public TConfigurationBuilder WithCommitMessageIncrementing(CommitMessageIncrementMode? value)
293293
{
294294
this.commitMessageIncrementing = value;
295295
return (TConfigurationBuilder)this;
296296
}
297297

298-
public virtual TConfigurationBuilder WithRegularExpression(string? value)
298+
public TConfigurationBuilder WithRegularExpression(string? value)
299299
{
300300
this.regularExpression = value;
301301
return (TConfigurationBuilder)this;
302302
}
303303

304-
public virtual TConfigurationBuilder WithTracksReleaseBranches(bool? value)
304+
public TConfigurationBuilder WithTracksReleaseBranches(bool? value)
305305
{
306306
this.tracksReleaseBranches = value;
307307
return (TConfigurationBuilder)this;
308308
}
309309

310-
public virtual TConfigurationBuilder WithIsReleaseBranch(bool? value)
310+
public TConfigurationBuilder WithIsReleaseBranch(bool? value)
311311
{
312312
this.isReleaseBranch = value;
313313
return (TConfigurationBuilder)this;
314314
}
315315

316-
public virtual TConfigurationBuilder WithIsMainBranch(bool? value)
316+
public TConfigurationBuilder WithIsMainBranch(bool? value)
317317
{
318318
this.isMainBranch = value;
319319
return (TConfigurationBuilder)this;
320320
}
321321

322-
public virtual TConfigurationBuilder WithPreReleaseWeight(int? value)
322+
public TConfigurationBuilder WithPreReleaseWeight(int? value)
323323
{
324324
this.preReleaseWeight = value;
325325
return (TConfigurationBuilder)this;
326326
}
327327

328-
public virtual TConfigurationBuilder WithConfiguration(IGitVersionConfiguration value)
328+
public TConfigurationBuilder WithConfiguration(IGitVersionConfiguration value)
329329
{
330330
WithAssemblyVersioningScheme(value.AssemblyVersioningScheme);
331331
WithAssemblyFileVersioningScheme(value.AssemblyFileVersioningScheme);

src/GitVersion.Configuration/ConfigurationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private IGitVersionConfiguration ProvideConfiguration(string? configFile,
7373
}
7474
}
7575

76-
private IReadOnlyDictionary<object, object?>? ReadOverrideConfiguration(string? configFilePath)
76+
private Dictionary<object, object?>? ReadOverrideConfiguration(string? configFilePath)
7777
{
7878
if (configFilePath == null)
7979
{

0 commit comments

Comments
 (0)