Skip to content

Commit

Permalink
(maint) Normalized files according to editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Dec 17, 2019
1 parent 5f48295 commit 773ee27
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 77 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion Source/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_diagnostic.CA1305.severity = none

# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = silent
dotnet_diagnostic.CA1031.severity = silent
2 changes: 1 addition & 1 deletion Source/GitReleaseManager.Cli/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
<PropertyGroup>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
</PropertyGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
</Project>
52 changes: 25 additions & 27 deletions Source/GitReleaseManager.Cli/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ private static Task<int> Main(string[] args)
return Parser.Default.ParseArguments<CreateSubOptions, DiscardSubOptions, AddAssetSubOptions, CloseSubOptions, PublishSubOptions, ExportSubOptions, InitSubOptions, ShowConfigSubOptions, LabelSubOptions>(args)
.WithParsed<BaseSubOptions>(CreateFiglet)
.MapResult(
(CreateSubOptions opts) => CreateReleaseAsync(opts),
(DiscardSubOptions opts) => DiscardReleaseAsync(opts),
(AddAssetSubOptions opts) => AddAssetsAsync(opts),
(CloseSubOptions opts) => CloseMilestoneAsync(opts),
(PublishSubOptions opts) => PublishReleaseAsync(opts),
(ExportSubOptions opts) => ExportReleasesAsync(opts),
(InitSubOptions opts) => CreateSampleConfigFileAsync(opts),
(ShowConfigSubOptions opts) => ShowConfigAsync(opts),
(LabelSubOptions opts) => CreateLabelsAsync(opts),
errs => Task.FromResult(1));
(CreateSubOptions opts) => CreateReleaseAsync(opts),
(DiscardSubOptions opts) => DiscardReleaseAsync(opts),
(AddAssetSubOptions opts) => AddAssetsAsync(opts),
(CloseSubOptions opts) => CloseMilestoneAsync(opts),
(PublishSubOptions opts) => PublishReleaseAsync(opts),
(ExportSubOptions opts) => ExportReleasesAsync(opts),
(InitSubOptions opts) => CreateSampleConfigFileAsync(opts),
(ShowConfigSubOptions opts) => ShowConfigAsync(opts),
(LabelSubOptions opts) => CreateLabelsAsync(opts),
errs => Task.FromResult(1));
}

private static void CreateFiglet(BaseSubOptions options)
Expand All @@ -68,23 +68,21 @@ private static void CreateFiglet(BaseSubOptions options)
{
version = version.Substring(0, version.IndexOf('+'));
}
var shortFormat = @"
____ ____ __ __
/ ___| _ \| \/ |
| | _| |_) | |\/| |
| |_| | _ <| | | |
\____|_| \_\_| |_|
{0,21}
";
var longFormat = @"
____ _ _ ____ _ __ __
/ ___(_) |_| _ \ ___| | ___ __ _ ___ ___| \/ | __ _ _ __ __ _ __ _ ___ _ __
| | _| | __| |_) / _ \ |/ _ \/ _` / __|/ _ \ |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
| |_| | | |_| _ < __/ | __/ (_| \__ \ __/ | | | (_| | | | | (_| | (_| | __/ |
\____|_|\__|_| \_\___|_|\___|\__,_|___/\___|_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|___/
{0,87}
";
// The following ugly formats is to prevent incorrect indentation
// detected by editorconfig formatters.
var shortFormat = "\n ____ ____ __ __\n"
+ " / ___| _ \\| \\/ |\n"
+ " | | _| |_) | |\\/| |\n"
+ " | |_| | _ <| | | |\n"
+ " \\____|_| \\_\\_| |_|\n"
+ "{0,21}\n";
var longFormat = "\n ____ _ _ ____ _ __ __\n"
+ " / ___(_) |_| _ \\ ___| | ___ __ _ ___ ___| \\/ | __ _ _ __ __ _ __ _ ___ _ __\n"
+ " | | _| | __| |_) / _ \\ |/ _ \\/ _` / __|/ _ \\ |\\/| |/ _` | '_ \\ / _` |/ _` |/ _ \\ '__|\n"
+ " | |_| | | |_| _ < __/ | __/ (_| \\__ \\ __/ | | | (_| | | | | (_| | (_| | __/ |\n"
+ " \\____|_|\\__|_| \\_\\___|_|\\___|\\__,_|___/\\___|_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_|\n"
+ " |___/\n"
+ "{0,87}\n";
if (Console.WindowWidth > 87)
{
Console.WriteLine(longFormat, version);
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion Source/GitReleaseManager.ruleset
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="GitReleaseManager Rules" Description="This rule set contains all rules. Running this rule set may result in a large number of warnings being reported. Use this rule set to get a comprehensive picture of all issues in your code. This can help you decide which of the more focused rule sets are most appropriate to run for your projects." ToolsVersion="16.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
Expand Down
2 changes: 1 addition & 1 deletion Source/GitReleaseManager.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.181
Expand Down
4 changes: 2 additions & 2 deletions Source/GitReleaseManager.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">ERROR</s:String></wpf:ResourceDictionary>
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">ERROR</s:String></wpf:ResourceDictionary>
28 changes: 14 additions & 14 deletions Source/GitReleaseManager/Configuration/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ public Config()
};

IssueLabelsInclude = new List<string>
{
"Bug",
"Duplicate",
"Enhancement",
"Feature",
"Help Wanted",
"Improvement",
"Invalid",
"Question",
"WontFix",
};
{
"Bug",
"Duplicate",
"Enhancement",
"Feature",
"Help Wanted",
"Improvement",
"Invalid",
"Question",
"WontFix",
};

IssueLabelsExclude = new List<string>
{
"Internal Refactoring",
};
{
"Internal Refactoring",
};

LabelAliases = new List<LabelAlias>();
}
Expand Down
42 changes: 21 additions & 21 deletions recipe.cake
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&version=2.0.0-unstable0157&prerelease

Environment.SetVariableNames(githubUserNameVariable: "GITTOOLS_GITHUB_USERNAME",
githubPasswordVariable: "GITTOOLS_GITHUB_PASSWORD");
githubPasswordVariable: "GITTOOLS_GITHUB_PASSWORD");

BuildParameters.SetParameters(context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./Source",
title: "GitReleaseManager",
repositoryOwner: "GitTools",
repositoryName: "GitReleaseManager",
appVeyorAccountName: "GitTools",
shouldRunGitVersion: true,
shouldRunDotNetCorePack: true);
buildSystem: BuildSystem,
sourceDirectoryPath: "./Source",
title: "GitReleaseManager",
repositoryOwner: "GitTools",
repositoryName: "GitReleaseManager",
appVeyorAccountName: "GitTools",
shouldRunGitVersion: true,
shouldRunDotNetCorePack: true);

BuildParameters.PackageSources.Add(new PackageSourceData(Context, "GPR", "https://nuget.pkg.github.com/GitTools/index.json", FeedType.NuGet, false));

BuildParameters.PrintParameters(Context);

ToolSettings.SetToolSettings(context: Context,
dupFinderExcludePattern: new string[] {
BuildParameters.RootDirectoryPath + "/Source/GitReleaseManager.Tests/*.cs",
dupFinderExcludePattern: new string[] {
BuildParameters.RootDirectoryPath + "/Source/GitReleaseManager.Tests/*.cs",
BuildParameters.RootDirectoryPath + "/Source/GitReleaseManager.IntegrationTests/*.cs",
BuildParameters.RootDirectoryPath + "/Source/GitReleaseManager/AutoMapperConfiguration.cs" },
testCoverageFilter: "+[GitReleaseManager*]* -[GitReleaseManager.Tests*]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
BuildParameters.RootDirectoryPath + "/Source/GitReleaseManager/AutoMapperConfiguration.cs" },
testCoverageFilter: "+[GitReleaseManager*]* -[GitReleaseManager.Tests*]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");

BuildParameters.Tasks.DotNetCoreBuildTask.Does((context) =>
{
var buildDir = BuildParameters.Paths.Directories.PublishedApplications;
var buildDir = BuildParameters.Paths.Directories.PublishedApplications;

var grmExecutable = context.GetFiles(buildDir + "/**/*.exe").First();
var grmExecutable = context.GetFiles(buildDir + "/**/*.exe").First();

context.Information("Registering Built GRM executable...");
context.Tools.RegisterFile(grmExecutable);
context.Information("Registering Built GRM executable...");
context.Tools.RegisterFile(grmExecutable);
});

BuildParameters.Tasks.CreateReleaseNotesTask
.IsDependentOn(BuildParameters.Tasks.DotNetCoreBuildTask); // We need to be sure that the executable exist, and have been registered before using it
.IsDependentOn(BuildParameters.Tasks.DotNetCoreBuildTask); // We need to be sure that the executable exist, and have been registered before using it

((CakeTask)BuildParameters.Tasks.ExportReleaseNotesTask.Task).ErrorHandler = null;
((CakeTask)BuildParameters.Tasks.PublishGitHubReleaseTask.Task).ErrorHandler = null;
BuildParameters.Tasks.PublishPreReleasePackagesTask.IsDependentOn(BuildParameters.Tasks.PublishGitHubReleaseTask);
BuildParameters.Tasks.PublishReleasePackagesTask.IsDependentOn(BuildParameters.Tasks.PublishGitHubReleaseTask);

Build.RunDotNetCore();
Build.RunDotNetCore();

0 comments on commit 773ee27

Please sign in to comment.