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

[Code refactor proposal] Split/merge multiple attributes into/from separate attribute lists #75411

Open
Rekkonnect opened this issue Oct 6, 2024 · 2 comments
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.

Comments

@Rekkonnect
Copy link
Contributor

Summary

Code refactors that convert between multiple attributes in a list and multiple attribute lists into a single attribute list

Details

The proposed refactors are the following:

  • provided on attribute lists that contain multiple attributes, splitting them into multiple attribute lists, each with one attribute, with the following options:
    • only split attributes that have constructor arguments
    • split all attributes
  • provided on the attribute list collection of the declared symbol, merging the attributes into one attribute list with the following options:
    • only merge attributes that have no constructor arguments
    • merge all attributes

Examples

[A, B, C, D(1), E]
[F]
[G, H]
public class C;

The proposed attribute list splitting refactoring will be available within each attribute list that contains more than one attributes, resulting in the following code:

  • split all attributes
// Only fixes the selected attribute list, in this case [A, B...]
[A]
[B]
[C]
[D(1)]
[E]
[F]
[G, H]
public class C;
  • only split attributes that have constructor arguments
[A, B, C, E]
[D(1)]
[F]
[G, H]
public class C;

For attribute merging, the inverse process will be applied.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Oct 6, 2024
@balogun14
Copy link

@Rekkonnect can i work on this

@Rekkonnect
Copy link
Contributor Author

Sure thing

@deepakrathore33 deepakrathore33 added Need Design Review The end user experience design needs to be reviewed and approved. and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Projects
Status: In Queue
Development

No branches or pull requests

3 participants