Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/editorconfig bug #154

Merged
merged 4 commits into from
Dec 26, 2024

Conversation

jamie-taylor-rjj
Copy link
Collaborator

@jamie-taylor-rjj jamie-taylor-rjj commented Dec 26, 2024

Rationale for this PR

This PR fixes #153 by fixing a very silly mistake. See if you can spot it:

// problematic line:
public class SecureHeadersMiddleware()

// fixed line:
public class SecureHeadersMiddleware

The problematic code was added when following a Rider suggestion to replace the constructor with a Primary constructor. This lead to the inclusion of the parenthesis after the class name, which seems to have had a cascading affect on the way that the .editorconfig saw the file.

There's certainly something in the .editorconfig which is at odds with primary constructors, but that's a problem for another day.

PR Checklist

Feel free to either check the following items (by place an x inside of the square brackets) or by replacing the square brackets with a relevant emoji from the following list:

  • ✅ to indicate that you have checked something off
  • ❎ to indicate that you haven't checked something off
  • ❓ to indicate that something might not be relevant (writing tests for documentation changes, for instance)

Essential

These items are essential and must be completed for each commit. If they are not completed, the PR may not be accepted.

  • [:question: ] I have added tests to the OwaspHeaders.Core.Tests project
  • [:white_check_mark: ] I have run the dotnet-format command and fixed any .editorconfig issues
  • [:white_check_mark: ] I have ensured that the code coverage has not dropped below 65%
  • [:white_check_mark: ] I have increased the version number in OwaspHeaders.Core.csproj (only relevant for code changes)

Optional

  • [:question: ] I have documented the new feature in the docs directory
  • [:question: ] I have provided a code sample, showing how someone could use the new code

Any Other Information

This section is optional, but it might be useful to list any other information you think is relevant.

Copy link
Owner

@GaProgMan GaProgMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GaProgMan GaProgMan merged commit 54fc9a1 into GaProgMan:main Dec 26, 2024
2 checks passed
@GaProgMan
Copy link
Owner

Looks like this was related to dotnet/format#2165, which makes me feel much better about having missed the cause in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug report: editorconfig might be broken
2 participants