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

Random vim 8.0 swap files at jshint/src by mike on jshint@2.11.0 #3549

Open
ed9w2in6 opened this issue Jun 4, 2021 · 4 comments
Open

Random vim 8.0 swap files at jshint/src by mike on jshint@2.11.0 #3549

ed9w2in6 opened this issue Jun 4, 2021 · 4 comments

Comments

@ed9w2in6
Copy link

ed9w2in6 commented Jun 4, 2021

I was traversing my disk to find vim swap files for removal which is then I stumbled on some vim swap files under src/.
Those files are last updated on 14 FEB 2020, created by vim 8.0, by a user named mike, on a computer named bruce.

I reached here via AtomLinter/linter-jshint and their last update of the dependencies (node's package.json) is near a year ago ( ~ FEB 2020 ), so these files might have been removed but I am not sure how to verify this.

In case that they are not removed, I hope this may help.

Version:

jshint@2.11.0

Shell output:

❯ ls -Gp -ah | grep --color=auto swp | xargs file
.jshint.js.swp:        Vim swap file, version 8.0, pid 9053, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/jshint.js
.lex.js.swp:           Vim swap file, version 8.0, pid 12842, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/lex.js
.messages.js.swp:      Vim swap file, version 8.0, pid 17046, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/messages.js
.options.js.swp:       Vim swap file, version 8.0, pid 8621, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/options.js
.prod-params.js.swp:   Vim swap file, version 8.0, pid 5227, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/prod-params.js
.reg.js.swp:           Vim swap file, version 8.0, pid 12028, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/reg.js
.scope-manager.js.swp: Vim swap file, version 8.0, pid 9336, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/scope-manager.js
.vars.js.swp:          Vim swap file, version 8.0, pid 3590, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/vars.js
@ILuxa2040

This comment has been minimized.

@ILuxa2040
Copy link

![Image of Yaktocat]❯ ls -Gp -ah | grep --color=auto swp | xargs file
.jshint.js.swp: Vim swap file, version 8.0, pid 9053, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/jshint.js
.lex.js.swp: Vim swap file, version 8.0, pid 12842, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/lex.js
.messages.js.swp: Vim swap file, version 8.0, pid 17046, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/messages.js
.options.js.swp: Vim swap file, version 8.0, pid 8621, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/options.js
.prod-params.js.swp: Vim swap file, version 8.0, pid 5227, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/prod-params.js
.reg.js.swp: Vim swap file, version 8.0, pid 12028, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/reg.js
.scope-manager.js.swp: Vim swap file, version 8.0, pid 9336, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/scope-manager.js
.vars.js.swp: Vim swap file, version 8.0, pid 3590, user mike, host bruce, file ~mike/projects/oss/jshint/jshint/src/vars.js

@jugglinmike
Copy link
Member

Thanks for the report! It looks like npm only partially implements the semantic of Git's file exclusion mechanism. You're seeing the result of the utility honoring the project's .gitignore file but failing to recognize my global .gitignore file.

We could address this using npm's built-in "allow list" functionality, but that has its own drawbacks (most notably, risk of failing to include critical files in some future release). So before we commit to any particular change, I'd like to understand if/how this is affecting folks' usage of the package.

@ed9w2in6
Copy link
Author

I had never heard this before! Good to learn something new.
It is absurd that npm does not look at the global .gitignore file.

Regarding the package, though I can't speak for everyone but personally I do not think it will affect the package usage-wise.
As a matter of fact, I would not have notice them if i wasn't doing a disk traversal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants