Skip to content

Support scoping validation to changed lines only #48

@Pretasoc

Description

@Pretasoc

There is already a ScopeToPullRequest option, but I have a particular repository where it would be beneficial to validate only the changed lines.

One file in the project receives regular updates and contains conditional compilation blocks that "hide" certain if statements depending on the platform. For example:

#if NET5_0_OR_GREATER
if (OperatingSystem.IsWindows())
{
#endif
    DoStuff();
#if NET5_0_OR_GREATER
}
#endif

This code cannot pass format checking when targeting frameworks both below and above .NET 5. Since this isn't a simple function call in my actual code (and I would prefer not to extract it into a separate method solely to satisfy formatting requirements), I would like the validation tasks to ignore such formatting issues when the affected lines have not changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions