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

Add ability to skip calculation of missing dependencies #242

Merged
merged 3 commits into from
Feb 12, 2018

Conversation

tSte
Copy link

@tSte tSte commented Feb 12, 2018

In some cases, you don't care about missing dependencies. While non-empty missing dependencies do not seem to affect CLI exit code, this might change in the future (#235).

This PR adds simple flag to both JS (skipMissing) and CLI (--skip-missing). It is optional (defaults to false - the original behavior).

Todo:

  • Add option to skip calculation of missing depenedencies
  • Add unit tests
  • Update readme

@codecov
Copy link

codecov bot commented Feb 12, 2018

Codecov Report

Merging #242 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #242      +/-   ##
==========================================
+ Coverage   98.43%   98.43%   +<.01%     
==========================================
  Files          25       25              
  Lines         447      448       +1     
==========================================
+ Hits          440      441       +1     
  Misses          7        7
Impacted Files Coverage Δ
src/constants.js 100% <ø> (ø) ⬆️
src/cli.js 100% <ø> (ø) ⬆️
src/index.js 100% <100%> (ø) ⬆️
src/check.js 98.83% <100%> (ø) ⬆️

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 153aa50...1d115ad. Read the comment docs.

Copy link
Member

@lijunle lijunle left a comment

Choose a reason for hiding this comment

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

Looks great!

`--json`: Output results in JSON. When not specified, depcheck outputs in human friendly format.

`--ignores`: A comma separated array containing package names to ignore. It can be glob expressions. Example, `--ignores=eslint,babel-*`.
`--ignores`: A comma separated array containing package names to ignore. It can be glob expressions. Example, `--ignores="eslint,babel-*"`.
Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

@lijunle lijunle merged commit e300302 into depcheck:master Feb 12, 2018
@lijunle
Copy link
Member

lijunle commented Feb 12, 2018

@tSte Do you want me to publish a new version for this?

@tSte
Copy link
Author

tSte commented Feb 12, 2018

@lijunle I hope I didn't break anything... ;)

@lijunle
Copy link
Member

lijunle commented Feb 12, 2018

@tSte I have high confidence with the test cases. 😃

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 this pull request may close these issues.

None yet

2 participants