Skip to content

Conversation

@magneticflux-
Copy link
Contributor

Previously, the property in the base class and the property in the subclass would both be returned, causing us to complain about duplicate arguments/options that are actually the same.

Closes #555

Previously, the property in the base class and the property in the subclass would both be returned, causing us to complain about duplicate arguments/options that are actually the same.

Closes natemcmaster#555
@magneticflux-
Copy link
Contributor Author

I think this handles all cases of property overriding while still correctly flagging property hiding/similar-looking private properties, but I'm new to C# so I might have missed an edge case!

@magneticflux-
Copy link
Contributor Author

@natemcmaster Just a friendly reminder!

If you'd like, I could also try adding a regression test for this specific case of attribute inheritance so it doesn't get inadvertently removed again.

@natemcmaster
Copy link
Owner

Hey, thanks for your patience and the reminder. I had been taking a break from open source. I think this looks like a legitimate bug that needs fixing. Adding some tests to show the bug (and that this change fixes the bug) would be good.

I know it's been almost year since you opened this, so sorry for the long delay .

@natemcmaster natemcmaster merged commit 66821d9 into natemcmaster:main Dec 28, 2025
3 checks passed
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.73%. Comparing base (5053c19) to head (66821d9).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/CommandLineUtils/Internal/ReflectionHelper.cs 66.66% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
- Coverage   77.79%   77.73%   -0.06%     
==========================================
  Files         104      104              
  Lines        3333     3342       +9     
  Branches      728      734       +6     
==========================================
+ Hits         2593     2598       +5     
- Misses        580      581       +1     
- Partials      160      163       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Support attributes with overrides

2 participants