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

Misleading description or behavior of the --skip-gitignore option #221

Open
php-coder opened this issue May 30, 2023 · 3 comments
Open

Misleading description or behavior of the --skip-gitignore option #221

php-coder opened this issue May 30, 2023 · 3 comments

Comments

@php-coder
Copy link
Contributor

php-coder commented May 30, 2023

# pdd --version
0.23.1
# pdd --help | grep gitignore
    --skip-gitignore  Don't look into .gitignore for excludes

The description makes me think that inspecting of .gitignore is enabled by default and this behavior can be disabled with the option. In fact, pdd disrespects my .gitignore and this option enables looking into .gitignore file.

Here is how I reproduced this:

# pdd -f pdd.xml -v
Found 1 lines in /data/mystamps/.pdd
My version is 0.23.1
Ruby version is 2.7.8 at x86_64-linux
Reading from root dir /data/mystamps
Excluding src/test/wiremock/**/*
...
/data/mystamps/target/mystamps.war.original is a binary file (34117363 bytes)
...
# pdd -f pdd.xml -v --skip-gitignore
Found 1 lines in /data/mystamps/.pdd
My version is 0.23.1
Ruby version is 2.7.8 at x86_64-linux
Reading from root dir /data/mystamps
Excluding src/test/wiremock/**/*
Excluding target/
...
# grep target .gitignore
target/
@php-coder
Copy link
Contributor Author

@yegor256 @pnatashap WDYT about this bug?

@proofit404
Copy link

This got me tricked as well. Probably, it's not the best name for such option. ESLint for example uses --ignore-path.

Maybe it's better to --exclude-file=.gitignore?

@pnatashap
Copy link
Contributor

@php-coder you can introduce more clear description. The meaning of this option is skipping search for puzzles in files mentioned in .gitignore.
exclude is an additional parameter to skip some files, but in gitignore we typically place all paths with binaries.

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

No branches or pull requests

3 participants