Skip to content
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

Fix: use async reading of stdin in bin/eslint.js #12230

Conversation

baerrach
Copy link
Contributor

@baerrach baerrach commented Sep 6, 2019

closes #12212

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

See #12212

What changes did you make? (Give an overview)

Applied nodejs recommendations for processing stdin as per https://github.com/nodejs/node/blob/master/doc/api/process.md#processstdin

Is there anything you'd like reviewers to focus on?

Compatibility with other operating systems.
I've only tested this on Windows.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Sep 6, 2019
@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface and removed triage An ESLint team member will look at this issue soon labels Sep 13, 2019
@mysticatea
Copy link
Member

Thank you for your contribution.

Would you add a test for this?
CI has multiplatform tests, it's great if we run tests on there.

@baerrach
Copy link
Contributor Author

I can, it'll take me a day or so to clear my work to find the time for this.

I'll have a look in the test cases, but all I need is a test that uses a large file (anything over 4k in size).

Does anyone know which test I can look at off the top of their heads?

@jsf-clabot
Copy link

jsf-clabot commented Sep 27, 2019

CLA assistant check
All committers have signed the CLA.

@baerrach baerrach force-pushed the fix/stdin-flag-fails-when-file-size-greater-4096-#12212 branch from ed18fc9 to 7c2387e Compare September 27, 2019 00:31
bin/eslint.js Outdated Show resolved Hide resolved
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Member

@mysticatea mysticatea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@mysticatea
Copy link
Member

Ah, @jsf-clabot seems to report a problem. Would you check the e-mail address of your commits?

@baerrach
Copy link
Contributor Author

@mysticatea that is because I pushed my changes from my work machine with a work email.

I then fixed that to my gmail account and force pushed to remove that work email.

Its now saying all checks passed, including licece/cla.

@mysticatea
Copy link
Member

The bot comment has been fixed 5 hours ago.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Mar 29, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--stdin flag fails when file size > 4096
4 participants