node icon indicating copy to clipboard operation
node copied to clipboard

build: apply cpp linting and formatting to ncrypto

Open avivkeller opened this issue 1 year ago • 8 comments

CC @jasnell (who appears to have contributed most of this work)

If these files are maintained in this repository, should they not follow the same linting / formatting rules? This PR has clang-format and cpplint apply to these files.

avivkeller avatar Oct 11 '24 19:10 avivkeller

Review requested:

  • [ ] @nodejs/security-wg

nodejs-github-bot avatar Oct 11 '24 19:10 nodejs-github-bot

CC @nodejs/crypto

avivkeller avatar Oct 11 '24 20:10 avivkeller

Oh nice. Thank you. I've been meaning to get to this. Very helpful

jasnell avatar Oct 11 '24 20:10 jasnell

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.91%. Comparing base (68dc15e) to head (786d5fa). Report is 873 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55362      +/-   ##
==========================================
- Coverage   88.40%   87.91%   -0.50%     
==========================================
  Files         654      654              
  Lines      187637   187746     +109     
  Branches    36098    35818     -280     
==========================================
- Hits       165887   165057     -830     
- Misses      14994    15885     +891     
- Partials     6756     6804      +48     

see 104 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Oct 11 '24 21:10 codecov[bot]

btw, the intention is to move ncrypto out to a separate repo once all of the work is done to separate it out. It'll be a while tho. At that time that separate project will have its own build and linting stuff

jasnell avatar Oct 11 '24 21:10 jasnell

CI: https://ci.nodejs.org/job/node-test-pull-request/63058/

nodejs-github-bot avatar Oct 11 '24 21:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63066/

nodejs-github-bot avatar Oct 12 '24 18:10 nodejs-github-bot

Hey, can someone restart the failed builds so this fix can land? Thanks!

avivkeller avatar Oct 17 '24 17:10 avivkeller

CI: https://ci.nodejs.org/job/node-test-pull-request/63226/

nodejs-github-bot avatar Oct 21 '24 08:10 nodejs-github-bot

@jasnell would you mind re-approving + CI-ing now that a new commit has been added?

avivkeller avatar Nov 03 '24 22:11 avivkeller

Why would we be linting a vendored dependency? 🤔

Because we are the author of the dependency. It's our dependency, and it lives in this repository, shouldn't it follow the same lint rules?

If/when ncrypto is moved to its own repository, this can be changed.

avivkeller avatar Nov 05 '24 22:11 avivkeller

the intention is to move ncrypto out to a separate repo once all of the work is done to separate it out. It'll be a while tho.

Does it need to be you doing that, or could it be anyone doing that? It seems to me we should do that instead of applying a linter in deps

aduh95 avatar Nov 05 '24 22:11 aduh95

Does it need to be you doing that....

No, but the process of separating these out into the dependency is tedious and difficult to get right without introducing breaking changes. I would rather it be done after that work is completed to make code reviews easier. In the meantime the linting and stuff is annoying and applying it here is useful.

jasnell avatar Nov 06 '24 00:11 jasnell

CI: https://ci.nodejs.org/job/node-test-pull-request/63463/

nodejs-github-bot avatar Nov 06 '24 22:11 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63498/

nodejs-github-bot avatar Nov 09 '24 16:11 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63502/

nodejs-github-bot avatar Nov 10 '24 13:11 nodejs-github-bot

Landed in e7991e8da608afa85412d0b0612be0f00d8a9392

nodejs-github-bot avatar Nov 10 '24 17:11 nodejs-github-bot