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

aegir lints files that are ignored by .gitignore #316

Closed
mkg20001 opened this issue Jan 12, 2019 · 6 comments · Fixed by #737
Closed

aegir lints files that are ignored by .gitignore #316

mkg20001 opened this issue Jan 12, 2019 · 6 comments · Fixed by #737

Comments

@mkg20001
Copy link
Contributor

This is kindof annoying because I usually happen to have some backup files created by some editors with non-fixed linting errors or simply manually created backups of untracked code that I find to messy to commit

I'd like to keep those files in those directories, but aegir isn't making that easy

@hugomrdias
Copy link
Member

feel free to re open this if this still happens.

@mkg20001
Copy link
Contributor Author

root@22c39badb7ca:/js-peer-id# npx aegir lint

/js-peer-id/src/index.js
  122:5  warning  Unexpected 'todo' comment  no-warning-comments

✖ 1 problem (0 errors, 1 warning)

root@22c39badb7ca:/js-peer-id# echo thisisgarbage > src/index.js.bak
root@22c39badb7ca:/js-peer-id# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	src/index.js.bak

nothing added to commit but untracked files present (use "git add" to track)
root@22c39badb7ca:/js-peer-id# echo '*.bak' > .gitignore
root@22c39badb7ca:/js-peer-id# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   .gitignore

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	node_modules/
	package-lock.json

no changes added to commit (use "git add" and/or "git commit -a")
root@22c39badb7ca:/js-peer-id# npx aegir lint

/js-peer-id/src/index.js
  122:5  warning  Unexpected 'todo' comment  no-warning-comments

✖ 1 problem (0 errors, 1 warning)

root@22c39badb7ca:/js-peer-id# mkdir src/index.js.bak.bak
root@22c39badb7ca:/js-peer-id# echo garbage > src/index.js.bak.bak/index.js
root@22c39badb7ca:/js-peer-id# git status    
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   .gitignore

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	node_modules/
	package-lock.json

no changes added to commit (use "git add" and/or "git commit -a")
root@22c39badb7ca:/js-peer-id# npx aegir lint

/js-peer-id/src/index.js
  122:5  warning  Unexpected 'todo' comment  no-warning-comments

/js-peer-id/src/index.js.bak.bak/index.js
  1:1  error  Use the global form of 'use strict'                                    strict
  1:1  error  Expected an assignment or function call and instead saw an expression  no-unused-expressions
  1:1  error  'garbage' is not defined                                               no-undef

✖ 4 problems (3 errors, 1 warning)

Lint errors
Error: Lint errors
    at /js-peer-id/node_modules/aegir/src/lint.js:97:21
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
root@22c39badb7ca:/js-peer-id# 

Still happening

@mkg20001
Copy link
Contributor Author

Can't reopen?!
screnshot

@hugomrdias
Copy link
Member

Probably I'm missing something but I can't see the problem in your output

@hugomrdias hugomrdias reopened this Jul 12, 2019
@mkg20001
Copy link
Contributor Author

@hugomrdias I have ignored *.bak, but regardless of that index.js.bak.bak/index.js gets linted, even when ignored.

The index.js.bak gets ignored, since it's not a .js file.

@hugomrdias
Copy link
Member

Ok I see
Globby has a options to ignore everything in gitignore

return globby(patterns)

I'll fix it ty

@hugomrdias hugomrdias mentioned this issue Feb 23, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants