Skip to content

Commit

Permalink
move formatting code to optional flag (#2085)
Browse files Browse the repository at this point in the history
* move formatting code to flag

* reformat code
  • Loading branch information
shiftkey committed Feb 6, 2020
1 parent 45621c0 commit 56895ea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Octokit/Models/Common/CheckStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum CheckConclusion

[Parameter(Value = "skipped")]
Skipped,

[Parameter(Value = "stale")]
Stale,
}
Expand Down
1 change: 1 addition & 0 deletions build/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class Context : FrostingContext
public string Target { get; set; }
public new string Configuration { get; set; }
public bool LinkSources { get; set; }
public bool FormatCode { get; set; }
public BuildVersion Version { get; set; }

public DirectoryPath Artifacts { get; set; }
Expand Down
1 change: 1 addition & 0 deletions build/Lifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public override void Setup(Context context)
context.Target = context.Argument("target", "Default");
context.Configuration = context.Argument("configuration", "Release");
context.LinkSources = context.Argument("linkSources", false);
context.FormatCode = context.Argument("formatCode", false);

context.Artifacts = "./packaging/";
context.CodeCoverage = "./coverage-results/";
Expand Down
2 changes: 1 addition & 1 deletion build/Tasks/FormatCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public override void Run(Context context)

public override bool ShouldRun(Context context)
{
return context.IsLocalBuild;
return context.FormatCode;
}
}

0 comments on commit 56895ea

Please sign in to comment.