-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
crypto: naming anonymouse functions #8993
Conversation
fixes some of it , not the whole thing. as requested in the thread, pull request per module. |
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.
Generally, this looks fine! Some of the lines need to be wrapped, and there’s a anonymouse
typo in the commit message.
return binding.certVerifySpkac(object); | ||
}; | ||
|
||
|
||
Certificate.prototype.exportPublicKey = function(object, encoding) { | ||
Certificate.prototype.exportPublicKey = function exportPublicKey(object, encoding) { |
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.
Could you check that your lines are no longer than 80 characters?
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.
done
Oh, and if your commit only partially solves a Github issue, it’s better to use use |
52568e7
to
975ee51
Compare
submitted changes |
Are methods on the prototype object actually a problem? In a normal stack trace they will have a full name e.g. function C() {}
C.prototype.method = function () { throw new Error(''); }
new C().method()
|
@AndreasMadsen when requesting .name i got an empty string. i assume that mattered to some people when debugging (check out the repl feedback , its pretty nice to have name set when you're using repl, really helps) |
return binding.certVerifySpkac(object); | ||
}; | ||
|
||
|
||
Certificate.prototype.exportPublicKey = function(object, encoding) { | ||
Certificate.prototype.exportPublicKey = function exportPublicKey(object, | ||
encoding) { |
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.
Typically we like to keep the parameters all lined up if on multiple lines. However in the case that a lined up parameter on a new line would exceed the 80 character mark, it would probably be better to just move everything after the =
to the next line and indent the entire function definition by 2 spaces.
Ditto for the changes below.
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.
ok ill do that
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.
done
975ee51
to
707f6c3
Compare
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 CI is green.
LGTM |
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.
Change looks okay, but commit message could use the following changes
- typo should be fixed and
- if possible, an imperative verb could be used as the first word. For example,
crypto: name anonymous functions
@jasnell hello james , my commit only changes javascript i dont see a reason why it wont work on all platforms just the same. looks like test-npm-install.js is the culprit (at least in the free-bsd box, arm has no report yet) |
@soleboxy Those failures look like infrastructure issues. |
New CI (we'll run it until it works ) https://ci.nodejs.org/job/node-test-pull-request/4490/ |
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
Ref: nodejs#8913 PR-URL: nodejs#8993
707f6c3
to
72be5ed
Compare
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
I’ll start landing this:
|
You author name in this commit is given as “solebox”. Is that intended or do you prefer to be listed (changelog, git log, AUTHORS file) with some other name? People typically prefer their full name, but ultimately it’s up to you. |
Landed in 6f05de4! 🎉 |
I'm going to hold off on backporting this at the moment, but I'm very curious where we landed on this and thoughts on backporting to v6 |
thanks :) |
@MylesBorins I pushed this onto v6.x-staging, it cherry picks clean, and will help @tniessen with #14376 which we asked for. Landed in e9235e8e2efb0443d0d770a7bdce4aff983fdbc9 for v6.x-staging. |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
crypto
Description of change
rename anonymouse functions
Ref: #8913