-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Namespace maintenance #98
Comments
The screenshot is from https://elm.pravdomil.com/packages/ |
Hi @pravdomil 👋 I see little benefits in doing this. There is already a convention of naming the packages with a name starting by One reason for this is that Another reason is that rule names tend to already be very long (see this one for instance) compared to other module names. Then these would all end up in the config : List Rule
config =
[ NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
, NoUnused.Variables.rule
] you'd have config : List Rule
config =
[ Review.Rule.NoUnused.CustomTypeConstructors.rule []
, Review.Rule.NoUnused.CustomTypeConstructorArgs.rule
, Review.Rule.NoUnused.Dependencies.rule
, Review.Rule.NoUnused.Exports.rule
, Review.Rule.NoUnused.Modules.rule
, Review.Rule.NoUnused.Parameters.rule
, Review.Rule.NoUnused.Patterns.rule
, Review.Rule.NoUnused.Variables.rule
] I think the more consistent naming at the moment for |
That is right. I was planning one day to have "module search". But with the current state, it will not work, because there is no module name prefix. Maybe I can do special case for elm-review, to add invisible prefix to modules. This way we don't have to worry about package names and module names and just module names. But that is maybe issue for https://github.com/elm/package.elm-lang.org/. For example Base64 works really nicely. If I want to create Base64 library I start the namespace with Base64. And will align with other libraries nicely. |
So in the end I join Also I realise that relying on module name is easier then on package name, you can change module name with new release, but changing package name is no that easy. Screenshot from packages browser: |
Well I got some false positives with |
Looking at elm review rules, it would be handy to establish a namespace for rules, something like
Review.Rule.Xyz
.Than we can easily for search for rules by namespace prefix.
And second, rules gets automatically categorised, if we spot "Review.Rule.NoAlways" we know that is a review rule.
What do you think?
The text was updated successfully, but these errors were encountered: