Skip to content

Commit

Permalink
Making sure linting works (#1019)
Browse files Browse the repository at this point in the history
* Making sure linting works

* Automatically linting code

---------

Co-authored-by: david-driscoll <david-driscoll@users.noreply.github.com>
  • Loading branch information
david-driscoll and david-driscoll authored Nov 29, 2023
1 parent f0d943c commit 4cde253
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Nuke/ICanLint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ public interface ICanLint : INukeBuild
/// <summary>
/// A ensure only the linted files are added to the commit
/// </summary>
public Target LintGitAdd => t => t
.Unlisted()
.After(PostLint)
.TriggeredBy(PostLint)
.OnlyWhenDynamic(() => LintPaths.Any())
.Executes(
() => GitTasks.Git($"add {string.Join(" ", LintPaths.Select(z => $"\"{RootDirectory.GetRelativePathTo(z)}\""))}")
);
public Target LintGitAdd =>
t => t
.Unlisted()
.After(PostLint)
.TriggeredBy(PostLint)
.OnlyWhenDynamic(() => LintPaths.Any())
.Executes(() => GitTasks.Git($"add {string.Join(" ", LintPaths.Select(z => $"\"{RootDirectory.GetRelativePathTo(z)}\""))}"));

/// <summary>
/// The lint paths rooted as an absolute path.
Expand Down

0 comments on commit 4cde253

Please sign in to comment.