Skip to content

1.1.3: Equality & Analyzer Fixes#28

Merged
MooVC merged 9 commits intomasterfrom
hotfix/19-pm-arrayequality
Oct 31, 2025
Merged

1.1.3: Equality & Analyzer Fixes#28
MooVC merged 9 commits intomasterfrom
hotfix/19-pm-arrayequality

Conversation

@MooVC
Copy link
Copy Markdown
Owner

@MooVC MooVC commented Oct 31, 2025

Pull Request

Description

Fixed

Checklist

Please ensure the following are true for your PR:

  • I have followed the project's coding style guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have verified that new and existing unit tests pass locally with my changes.
  • I have updated the documentation (if applicable).
  • I have confirmed that my code is free from warnings and errors.
  • I have reviewed suggestions and determined no actions is required.
  • I have updated the CHANGELOG.md
  • I have performed a self-review of my code.

MooVC and others added 9 commits October 26, 2025 16:14
…c the equality behavior supported by Valuify (#19).

Added Console and Console.Tests to support tests on generated code (rather than just tests for generated code).
* Mirror declaration snippets in console project

* Corrected Simple class definitions - some minor whitespace cleanup

* Supressed annoying warning

* Addressed some warnings
* Add comprehensive tests for SimpleForInt Monify output

* Corrected tests for SimpleForInt
* Add Monify console wrapper tests

* Minor format corrections

* - `ToString` no longer throws a `FormatException`.

* - Equality checks involing an encapsulated array containing identical values now yield true (#19).
* Add ForString operator tests for equivalent strings

* Applied suggestions
* Flatten nested console test InnerTests directories

* Remove trailing newlines from nested console tests
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 217 to +219
private static bool IsViolatingCapturesStateRule(INamedTypeSymbol? symbol, ITypeSymbol? value)
{
return symbol is null || value is null || !symbol.IsStateless(value, out _);
return symbol is null || !symbol.IsStateless(value, out _);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Captures-state rule still fires when encapsulated type is unresolved

The fix for MONFY03 assumes the encapsulated value type is null, but HasMonify never returns a null type – when the attribute’s type argument can’t be resolved it yields an IErrorTypeSymbol. Analyze still passes that symbol into IsViolatingCapturesStateRule, so IsStateless evaluates the real fields against an error type and returns false, which means MONFY03 is still reported even though the type information is missing. To actually skip the diagnostic when the value type can’t be determined, the rule needs to detect unresolved types (e.g. IErrorTypeSymbol) or bail out when HasMonify fails instead of running the stateless check.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 217 to +219
private static bool IsViolatingCapturesStateRule(INamedTypeSymbol? symbol, ITypeSymbol? value)
{
return symbol is null || value is null || !symbol.IsStateless(value, out _);
return symbol is null || !symbol.IsStateless(value, out _);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Captures-state rule still fires when encapsulated type is unresolved

The fix for MONFY03 assumes the encapsulated value type is null, but HasMonify never returns a null type – when the attribute’s type argument can’t be resolved it yields an IErrorTypeSymbol. Analyze still passes that symbol into IsViolatingCapturesStateRule, so IsStateless evaluates the real fields against an error type and returns false, which means MONFY03 is still reported even though the type information is missing. To actually skip the diagnostic when the value type can’t be determined, the rule needs to detect unresolved types (e.g. IErrorTypeSymbol) or bail out when HasMonify fails instead of running the stateless check.

Useful? React with 👍 / 👎.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.76%. Comparing base (0e1a9b0) to head (f5b3f18).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   93.84%   93.76%   -0.09%     
==========================================
  Files          41       44       +3     
  Lines         845      866      +21     
  Branches       86       89       +3     
==========================================
+ Hits          793      812      +19     
- Misses         48       50       +2     
  Partials        4        4              

☔ 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.

@MooVC MooVC merged commit 4601980 into master Oct 31, 2025
4 of 5 checks passed
@MooVC MooVC deleted the hotfix/19-pm-arrayequality branch October 31, 2025 21:56
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.

MONFY03 Incorrectly Raised for Empty Class Equality Check Fails when Encapsulated Value is an Array

1 participant