GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — tools: add GitHub Action linter for pr-url by aduh95 · Pull Request #37221 · nodejs/node Conversation
|
Yes, it would print out warnings, but the workflow would still end with a green ticks – it only outputs warnings and not errors (so it wouldn't interfere with ncu or the commit queue).
I remember trying to do that when I added the YAML linting a while back, but couldn't find a way: the linter parses all |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| import process from 'node:process'; | |
| import readline from 'node:readline'; | |
| import readline from 'readline'; |
nit: since process is a part of the global object
question: why are we prepending 'node:' to the imported module names?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
nit: since
processis a part of theglobalobject
I try to not rely on Node.js-only globals when writing ES modules to ease a potential port to the browser. I really don't feel strongly about that, and am willing to remove the import if anyone disagrees.
question: why are we prepending
'node:'to the imported module names?
Every time we try to introduce a new module in core comes the question of how breaking it would be for the ecosystem (is there a module that use the same name out there). It's been discussed several time to add a prefix to core modules, and with ESM we had to come up with a URL scheme to be spec compliant. TSC has decided that it will be ported to the CJS resolver as well (see #36098), so why not use it.
Again, I don't feel strongly about that either, if the consensus is not to use the prefix, that'd be fine with me.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The currentLine gets incremented over parts of the diff log where
line is deleted (prepended with -s) whereas we want currentLine
to remain the same while traversing deletions. Hence, the warning will
point to incorrect line numbers though line holds the correct value.
How should we fix this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| const validatePrUrl = (url) => url == null || url === expectedPrUrl; | |
| const validatePrUrl = (url) => url === expectedPrUrl; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| let currentPrUrl; | |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| } else if (!validatePrUrl(line.match(prUrlDefinition)?.[1])) { | |
| } else if (currentPrUrl = line.match(prUrlDefinition)?.[1] && | |
| validatePrUrl(currentPrUrl)) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@aduh95 currently, + pr-url: Added some suggestions to fix that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| if: ${{ github.event.pull_request }} | |
| if: github.event.pull_request.draft == false |
Isn't this supposed to be the check here (based on the above jobs)?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I meant to check only pull request (it wouldn't work on push, because it needs a PR URL), and I believe it's fine to have it running on draft PRs because it doesn't produce errors.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
That doesn't seem necessary, that kind of checks are already made by the linter, it would produce a warning on top of the error from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can we disable |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If you open a PR to re-enable linter GH actions for draft PR, I'd gladly approve it (I'm with with on that, I think it makes opening draft PR useless). I don't think it's a good idea to make |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: nodejs#37221 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
|
Landed in 33d3a2e |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #37221 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #37221 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.