-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Feature request] Optimization steps #12
Comments
|
Empty lines and trim are done: #33 @ameshkov In your opinion what is the correct sorting strategy if a rule has one or more comments? For example: Input:
Possible output:
I've done something similar before, here's the link: |
@scripthunter7 Hmm, that's a good question. Your approach seems very reasonable to me. |
@ameshkov As my free time allows, I'd like to further develop the linked script and convert it to an NPM package. After I'm done with it, the package can be easily integrated to Hostlist Compiler as a transformation such as SortRulesDesc / SortRulesAsc / SortRules or anything else. It is not closely related to this topic, but I will describe what I mean by further development. The rules could be grouped according to their type, then the rules within that group can then be sorted again. For example:
to:
The configuration for this sorting script can be something like this: {
"groupOrder": [
"general_hide",
"specific_hide",
etc.
]
} It is similar to the current script anyway, but it does not automatically detect groups yet. However, it is also necessary to clarify key issues such as the proper handling of comments (headers / sections / conditions etc). |
Yeah, pre-compiler directives should retain the order and work like a comment with a following empty line. Also, there are hints that should be also considered. |
Hello,
please, consider about implement these optimization steps:
Thank you.☺️
Cheers
The text was updated successfully, but these errors were encountered: