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

Should fail if --baseline file does not found? #2374

Closed
ybiquitous opened this issue Feb 26, 2020 · 2 comments · Fixed by #2427
Closed

Should fail if --baseline file does not found? #2374

ybiquitous opened this issue Feb 26, 2020 · 2 comments · Fixed by #2427

Comments

@ybiquitous
Copy link

Hi,

When I'm using detekt via CLI, I noticed a behavior that is not very intuitive.

When I accidentally pass a non-existent file to the --baseline option, detekt never outputs about the invalid file and succeeds.

# NG: basline.xml
# OK: baseline.xml
$ detekt --baseline basline.xml

I wasted time until I noticed the filename was incorrect, so I think it more useful if detekt would fail fast when passing an invalid file path to the --baseline option.

For example:

$ detekt --baseline basline.xml
Invalid the file path `basline.xml` is specified to the `--baseline` option!

What do you think about this idea?

Thank you for reading.

@BraisGabin
Copy link
Member

I think that you are right. This is the current behaviour of the detekt gradle plugin so we should fail if the baseline file doesn't exist too.

@ybiquitous
Copy link
Author

Thank you! 😊

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

Successfully merging a pull request may close this issue.

3 participants