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

Chore: make library files non-executable #10021

Merged
merged 1 commit into from Feb 26, 2018
Merged

Conversation

not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Feb 25, 2018

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

[x] Other, please explain:

What changes did you make? (Give an overview)

lib/linter.js and lib/rules/template-tag-spacing.js are marked as executable but aren't actually valid executable files. This commit marks them as non-executable.

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

Nothing in particular

@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Feb 25, 2018
@not-an-aardvark not-an-aardvark changed the title Chore: make lib/linter.js non-executable Chore: make library files non-executable Feb 25, 2018
@not-an-aardvark not-an-aardvark force-pushed the no-executable-linter branch 3 times, most recently from 0644000 to 1006440 Compare February 25, 2018 06:36
@ilyavolodin
Copy link
Member

Could you explain what you mean by "marked as executable"? I'm pretty sure this is something I'm not familiar with, and since diff doesn't show anything, it's hard to review.

@not-an-aardvark
Copy link
Member Author

All files have an "execute bit" stored as part of their metadata, which indicates whether the file can be executed on its own (e.g. as ./foo.js rather than node foo.js). Since lib/linter.js previously had its execute bit set, it was possible to run lib/linter.js in a shell and have it be interpreted as a bash script. However, this was not useful for anything and would generally result in a syntax error. The bit was probably not set intentionally.

Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

LGTM. Something to think about later: Is there an ESLint plugin or a more generalized pre-commit hook we could add to avoid this in future?

@not-an-aardvark
Copy link
Member Author

I don't know of any existing plugins. (I found these files with fselect.) Maybe that could be something added to eslint-plugin-node.

This was referenced Mar 22, 2018
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Aug 27, 2018
@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 Aug 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants