-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
RE: Add output when no files match #140
Comments
It's related to your config. Please remove Globs are keys of the config object, so with you current setup you will miss all |
Awesome, thanks Andrey :) |
Hmm, i still seem to get this even with removing |
Weird. This should be only displayed once. Can you run lint-staged with |
I just tried it with ❯ g commit (env: onespacemedia)
{ verbose: true,
'*.js': [ 'eslint --fix', 'git add' ],
'*.css': 'stylelint',
'*.py':
[ 'pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n',
'isort --check-only --diff --quiet --skip-glob=.venv --skip-glob=node_modules --skip-glob=*/migrations/*' ] }
[15:35:38] Running tasks for verbose [started]
[15:35:38] Running tasks for *.js [started]
[15:35:38] Running tasks for *.css [started]
[15:35:38] Running tasks for *.py [started]
[15:35:38] Running tasks for verbose [skipped]
[15:35:38] → No staged files match verbose
[15:35:38] Running tasks for *.js [skipped]
[15:35:38] → No staged files match *.js
[15:35:38] stylelint [started]
[15:35:38] pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n [started]
[15:35:39] stylelint [completed]
[15:35:39] Running tasks for *.css [completed]
[15:35:47] pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n [failed]
[15:35:47] → 🚫 pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n found some errors. Please fix them and try committing again.
No config file found, using default configuration
************* Module onespacemedia.apps.sections.migrations.0009_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0007_auto_20170317_1434
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0006_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
[15:35:47] Running tasks for *.py [failed]
[15:35:47] → 🚫 pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n found some errors. Please fix them and try committing again.
No config file found, using default configuration
************* Module onespacemedia.apps.sections.migrations.0009_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0007_auto_20170317_1434
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0006_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
🚫 pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n found some errors. Please fix them and try committing again.
No config file found, using default configuration
************* Module onespacemedia.apps.sections.migrations.0009_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0007_auto_20170317_1434
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0006_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
pre-commit:
pre-commit: We've failed to pass the specified git pre-commit hooks as the `lint-staged`
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit:
pre-commit: git commit -n (or --no-verify)
pre-commit:
pre-commit: This is ill-advised since the commit is broken.
pre-commit: without:❯ g commit (env: onespacemedia)
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
↓ Running tasks for *.js [skipped]
→ No staged files match *.js
✔ Running tasks for *.css
❯ Running tasks for *.py
→ W: 4, 0: Unused models imported from django.db (unused-import)
✖ pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n
→ W: 4, 0: Unused models imported from django.db (unused-import)
isort --check-only --diff --quiet --skip-glob=.venv --skip-glob=node_modules --skip-glob=*/migrations/*
🚫 pylint --load-plugins pylint_django,pylint_mccabe --ignore=migrations,tests -d missing-docstring,invalid-name,no-init,too-many-ancestors,no-member,line-too-long,attribute-defined-outside-init,too-few-public-methods,no-self-use,unused-argument,protected-access,locally-disabled,duplicate-code,fixme --reports=n found some errors. Please fix them and try committing again.
No config file found, using default configuration
************* Module onespacemedia.apps.sections.migrations.0009_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0007_auto_20170317_1434
W: 4, 0: Unused models imported from django.db (unused-import)
************* Module onespacemedia.apps.components.migrations.0006_auto_20170317_1143
W: 4, 0: Unused models imported from django.db (unused-import)
pre-commit:
pre-commit: We've failed to pass the specified git pre-commit hooks as the `lint-staged`
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit:
pre-commit: git commit -n (or --no-verify)
pre-commit:
pre-commit: This is ill-advised since the commit is broken.
pre-commit: Sorry for the length but that's how bad my terminal is :( |
It should be:
Please refer to README |
I tried it with that config and still get the same output |
@dan-gamble can you isolate the behavior? Please remove your TBH I don't know how to help you just by looking at the output. Again, I've never seen such behavior before. |
Ideally it would be a github repo where I can reproduce your behavior. |
Sure thing i'll see if i can come up with a small repro repo for you 👍 |
@dan-gamble I came across the same problem 😭 , but I fix that😄.
Hope that it helps. |
Thanks @ipland what on there do you think was causing the problem? |
I've just added
lint-staged
as we currently have apre-push
hook that takes a while and isn't that intuitive, i figured if we could do it with this instead it might speed up our process a bit.It's working nicely so far but the output can be very noisy, i think it is in relation to #135. I do like the idea of #135 but it seems to give me a comment for each file it iterates over. Would it be possible to just have 1
[skipped]
message for the whole commit instead of a per file basis?I'm not 100% sure if it is per file as the
*.py
and*.css
messages aren't duplicated.package.json
Terminal output
The text was updated successfully, but these errors were encountered: