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

fix: check for arguments with restricted keywords #756

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

TimothyMakkison
Copy link
Collaborator

@TimothyMakkison TimothyMakkison commented Sep 16, 2023

Description

  • Added RestrictedNameHelper which is called by the MethodParameter constructor
    • ToSafeName checks the input for every restricted keyword. This should be really fast in .Net 8 but I doubt it will make any impact in prior versions
  • Added tests

Fixes #402

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented
  • Unit tests are added/updated

@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Merging #756 (9166463) into main (bbac6d0) will increase coverage by 0.10%.
The diff coverage is 98.91%.

❗ Current head 9166463 differs from pull request most recent head cfbf9d2. Consider uploading reports for the commit cfbf9d2 to get more accurate results

@@            Coverage Diff             @@
##             main     #756      +/-   ##
==========================================
+ Coverage   91.30%   91.41%   +0.10%     
==========================================
  Files         201      202       +1     
  Lines        6628     6719      +91     
  Branches      821      822       +1     
==========================================
+ Hits         6052     6142      +90     
  Misses        387      387              
- Partials      189      190       +1     
Files Changed Coverage Δ
src/Riok.Mapperly/Helpers/RestrictedNameHelper.cs 98.80% <98.80%> (ø)
src/Riok.Mapperly/Symbols/MethodParameter.cs 90.90% <100.00%> (+15.90%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@latonz latonz enabled auto-merge (squash) September 19, 2023 16:13
@latonz latonz merged commit 8f7528a into riok:main Sep 20, 2023
17 checks passed
@github-actions
Copy link

🎉 This PR is included in version 3.3.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

@ in variable names is ignored
2 participants