Skip to content

Conversation

@gero3
Copy link
Contributor

@gero3 gero3 commented Jul 26, 2023

Remove duplicate checks on path in test

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

3 checks were duplicate in test.

Description

            if (relativePath.EndsWith(".csproj", StringComparison.Ordinal) ||
                relativePath.EndsWith(".fsproj", StringComparison.Ordinal) ||
                relativePath.EndsWith(".props", StringComparison.Ordinal) ||
                relativePath.EndsWith(".targets", StringComparison.Ordinal) ||            // duplicate
                relativePath.StartsWith("bin/", StringComparison.Ordinal) ||                // duplicate
                relativePath.StartsWith("obj/", StringComparison.Ordinal) ||                // duplicate
                relativePath.EndsWith(".sln", StringComparison.Ordinal) ||
                relativePath.EndsWith(".targets", StringComparison.Ordinal) ||            // duplicate
                relativePath.StartsWith("bin/", StringComparison.Ordinal) ||                // duplicate
                relativePath.StartsWith("obj/", StringComparison.Ordinal) ||                // duplicate
                relativePath.Contains("/bin/", StringComparison.Ordinal) ||
                relativePath.Contains("/obj/", StringComparison.Ordinal))
            {
                continue;
            }

was
Fixes #49647

@ghost ghost added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member labels Jul 26, 2023
@ghost
Copy link

ghost commented Jul 26, 2023

Thanks for your PR, @gero3. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mkArtakMSFT mkArtakMSFT merged commit b3eca05 into dotnet:main Jul 28, 2023
@ghost ghost added this to the 8.0-rc1 milestone Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup duplicate code in src/ProjectTemplates/test/Templates.Tests/BaselineTest.cs

3 participants