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

Make LintRoller::Plugin sortable #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koic
Copy link
Contributor

@koic koic commented Feb 4, 2025

Typically, it is expected that LintRoller::Plugin#about includes a name, and sorting would be performed based on that name. However, currently, executing sort on LintRoller results in the following error:

ArgumentError: comparison of LintRoller::PluginTest::SampleRoller with LintRoller::PluginTest::AnotherRoller failed

This PR makes LintRoller::Plugin sortable by name. I considered including the version as well, but I could not come up with any use cases where multiple plugins with the same name would need to be processed simultaneously.

Typically, it is expected that `LintRoller::Plugin#about` includes a name,
and sorting would be performed based on that name. However, currently,
executing `sort` on LintRoller results in the following error:

```console
ArgumentError: comparison of LintRoller::PluginTest::SampleRoller with LintRoller::PluginTest::AnotherRoller failed
```

This PR makes `LintRoller::Plugin` sortable by name. I considered including the version as well,
but I could not come up with any use cases where multiple plugins with the same name would need to be processed simultaneously.
@koic koic force-pushed the make_plugin_class_sortable branch from aecdd2e to 89e7bda Compare February 4, 2025 18:23
@koic koic changed the title Make Plugin class sortable Make LintRoller::Plugin sortable Feb 4, 2025
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.

1 participant