Skip to content

Allow multiple [CleanUtility(...)] annotations per class#88

Open
TonyTroeff wants to merge 5 commits intomainfrom
troeff/allow-multiple-clean-utility-attributes
Open

Allow multiple [CleanUtility(...)] annotations per class#88
TonyTroeff wants to merge 5 commits intomainfrom
troeff/allow-multiple-clean-utility-attributes

Conversation

@TonyTroeff
Copy link
Copy Markdown
Member

Pull Request Description

This pull request introduces support for allowing multiple [CleanUtility(...)] annotations on the same class, enhancing the functionality and flexibility of the CleanUtility attribute.

Motivation and Context

Previously, it was only possible to use a single [CleanUtility(...)] annotation per class, which could be limiting for more complex scenarios requiring multiple attributes. This change provides more versatility.

Checklist

  • I have tested these changes thoroughly.
  • I have added/updated relevant documentation.
  • My code follows the project's coding guidelines.
  • I have performed a self-review of my changes.
  • My changes are backwards compatible.

@TonyTroeff TonyTroeff self-assigned this Sep 5, 2025
@TonyTroeff TonyTroeff added feature Something that should be implemented task A simple unit of work used to move the features forward labels Sep 5, 2025
@TonyTroeff TonyTroeff linked an issue Sep 5, 2025 that may be closed by this pull request
@TonyTroeff TonyTroeff added this to the 1.2.0 milestone Sep 5, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Sep 5, 2025

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables multiple [CleanUtility(...)] annotations on the same class by changing the AllowMultiple parameter from false to true in the CleanUtilityAttribute. The existing code in CleanTestFramework.cs already supports iteration over multiple attributes, so the change enables a previously disabled capability.

Changes:

  • Modified CleanUtilityAttribute to allow multiple instances per class (AllowMultiple = true)
  • Renamed local variable from initializationUtilityAttributes to cleanUtilityAttributes for better consistency with the attribute name

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
TryAtSoftware.CleanTests.Core/Attributes/CleanUtilityAttribute.cs Updated AttributeUsage to allow multiple annotations per class
TryAtSoftware.CleanTests.Core/XUnit/CleanTestFramework.cs Renamed variable for consistency (functionality already supported multiple attributes)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TryAtSoftware.CleanTests.Core/Attributes/CleanUtilityAttribute.cs
Comment thread TryAtSoftware.CleanTests.Core/XUnit/CleanTestFramework.cs
Comment thread TryAtSoftware.CleanTests.Core/Attributes/CleanUtilityAttribute.cs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/TryAtSoftware.CleanTests.UnitTests/CleanUtilitiesDistributionTests.cs Outdated
@sonarqubecloud
Copy link
Copy Markdown

neofitov added a commit to neofitov/Training-SoftUni that referenced this pull request May 6, 2026
Replace hardcoded TryAtSoftware/CleanTests#88 with argparse so the
reviewer can be pointed at any repository and pull request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Something that should be implemented task A simple unit of work used to move the features forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support to define multiple [CleanUtility] attributes

2 participants