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
chore: improve Ecosystem.md
linter to check for improper module name patterns
#4257
Conversation
Improve ecosystem linting script by returning an error in case of an improperly added module name pattern (i.e., not enclosed with backticks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
if (inCommunitySection === false) { | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to point out that the script currently only lints the modules in the #### [Community]
section, it doesn't lint modules in either #### [Community Tools]
or #### [Core]
sections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've re-arranged the order of the conditionals to make the script check for misformatted patterns in all sections, but it only checks for ordering in the community section (the previously existing behavior before I add any changes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep this comment unresolved, feel free to resolve it if you don't have any comments regarding this
Ecosystem.md
linting scriptEcosystem.md
linter to check for improper module name patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reduce the change set to only solve the issue being addressed. Fixing the misspelling is okay, but changing around the logic makes it difficult to review the proposed change.
The change set only addresses the issue of checking for improperly formatted module names (specifically, module names missing either or both the backticks, as in the linked issue) I can try to make a self-review to attempt to clarify the changes in case they aren't clear, but the overall code changes can be summarized as follows:
Hope this comment clarifies the changes better now in case of checking the individual commits is unclear |
The issue at hand is #4256 in which want verify that items are formatted as
instead of allowing |
The change set addresses this specific issue only, but I've had to make a few changes to address the issue, and I've attempted to clarify them in my comment, which code blocks in your opinion are irrelevant, so I can remove them? I might try to make the diff as small as possible (perhaps removing the line breaks I've added and to use a local scope for Btw, I've used https://github.com/nektos/act to test and run the script locally |
You stated:
And:
This has resulted in a difficult to read change set in regards to the issue purportedly being solved, as I have outlined. Please do not change the functionality of the script in this pull request, and limit it fixing the line validation what was previously being performed. |
I apologize if this is the source of confusion, but I've made this comment when I had only the first commit So, I was stating the general functionality of the script, and I've stated that it currently only checks for bad module formats (but it was limited to |
I've reverted back to a previous state, the script now is limited to the Hopefully this is more clear, but if you wish that I drop the final commit (i.e., the revert commit), I can do so, but I've done this to make it the diff as small as possible, so you can easily review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
continue | ||
} | ||
|
||
if (line.startsWith('- [`') !== true) { | ||
if (line.startsWith('- [') !== true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this makes sense. We were just skipping the line if it started like - [f
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, cases like - [foo]
, - [foo`]
were undetectable.
In regard to extending the script functionality, do you wish that I make another commit with it? (as I stated, Core
and Community Tools
were being validated, but I've reverted this part in my last commit)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be a new pull request with an improvement. I originally left those out because they are generally only added by the core Fastify team. We don't usually have out-of-order issues with those. But it doesn't hurt to add the validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then, should I then open another PR with this state? 70027c57c1
(i.e., before the revert commit). Or are there any other changes you would like to point out to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather just review the feature in isolation instead of trying to pick it out of other changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened another PR at #4258
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Improve ecosystem linting script by returning an error in case of an improperly added module name pattern (i.e., not enclosed with backticks)
Resolves #4256
Checklist
npm run test
andnpm run benchmark
and the Code of conduct