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.
There is already a
ScopeToPullRequestoption, 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
ifstatements depending on the platform. For example: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.