Skip to content

Do not swallow already detected deprecated usage by last task - #991

Merged
iiroj merged 1 commit into
lint-staged:masterfrom
bobisjan:git-add-detection-fix
Jul 13, 2021
Merged

iiroj merged 1 commit into
lint-staged:masterfrom
bobisjan:git-add-detection-fix

Conversation

@bobisjan

Copy link
Copy Markdown
Contributor

No description provided.

@bobisjan
bobisjan force-pushed the git-add-detection-fix branch 3 times, most recently from 042d637 to aba6501 Compare July 13, 2021 07:05
@bobisjan
bobisjan force-pushed the git-add-detection-fix branch from bf170f4 to 4aed52c Compare July 13, 2021 07:19
@codecov

codecov Bot commented Jul 13, 2021

Copy link
Copy Markdown

Codecov Report

Merging #991 (4aed52c) into master (4f9a146) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #991   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          611       612    +1     
  Branches       144       145    +1     
=========================================
+ Hits           611       612    +1     
Impacted Files Coverage Ξ”
lib/runAll.js 100.00% <100.00%> (ΓΈ)

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 4f9a146...4aed52c. Read the comment docs.

@iiroj

iiroj commented Jul 13, 2021

Copy link
Copy Markdown
Member

Thanks, this looks like a clear bug. Does this mean the warning is not shown if a task using git add is followed by another that doesn't?

@bobisjan

bobisjan commented Jul 13, 2021 •

Copy link
Copy Markdown
Contributor Author

Does this mean the warning is not shown if a task using git add is followed by another that doesn't?

Yes, that was exactly our case.

TBH I've failed to update the test with following config, it looks that snapshots are not stable across platforms? (AppVeyor passed, but Ubuntu failed with different order of the output)

{
  '*.js': ['prettier --write', 'git add'],
  '**/*.js': ['prettier --write']
}

@iiroj

iiroj commented Jul 13, 2021

Copy link
Copy Markdown
Member

We really should get rid of Appveyor and start using GitHub Actions for Windows as well, but yeah, that requires a lot of rework with the testing setup...

In any case, I'll merge this since it seems straightforward enough.

@iiroj
iiroj self-requested a review July 13, 2021 08:45
@iiroj
iiroj merged commit 7734156 into lint-staged:master Jul 13, 2021
@bobisjan
bobisjan deleted the git-add-detection-fix branch July 13, 2021 08:49
@github-actions

Copy link
Copy Markdown
Contributor

πŸŽ‰ This PR is included in version 11.0.1 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

zeekay pushed a commit to hanzoai/lint-staged that referenced this pull request Sep 9, 2026
…int-staged#991)

The deprecation warning instructing users to remove `git add` from their tasks
was not shown if a valid task followed the deprecated one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants