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

Avoid creating .cache directory in cwd #1419

Merged
merged 3 commits into from Mar 3, 2021
Merged

Avoid creating .cache directory in cwd #1419

merged 3 commits into from Mar 3, 2021

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Mar 2, 2021

Instead of using cwd for the .cache folder, we now try to use the project_dir for that, which defaults to the location of
.ansiblelint config file.

Running ansible-lint from a subdirectory of the project, should no longer create .cache folders in new locations.

Execution outside a project or a git repository will make the linter use user home directory as reference,

@ssbarnea ssbarnea added the bug label Mar 2, 2021
@ssbarnea ssbarnea force-pushed the 0/wip branch 2 times, most recently from d74213a to a3084cd Compare March 2, 2021 13:56
Instead of always using cwd for the .cache folder, we now try to use
the project_dir for that, which defaults to the location of
.ansiblelint config file.

If there is no config file found and git fails to report a project
root, it will use ~/.cache
Copy link
Contributor

@aminvakil aminvakil left a comment

Choose a reason for hiding this comment

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

I'm not sure what magic git you're running :) but on latest git installation (2.30.1) from https://git-scm.com/ there is no git ignore command as far as I know.

Edit: As far as I can tell other than this little documentation fix, everything else is ok.

docs/usage.rst Outdated Show resolved Hide resolved
Co-authored-by: Amin Vakil <info@aminvakil.com>
@ssbarnea
Copy link
Member Author

ssbarnea commented Mar 3, 2021

I'm not sure what magic git you're running :) but on latest git installation (2.30.1) from https://git-scm.com/ there is no git ignore command as far as I know.

Edit: As far as I can tell other than this little documentation fix, everything else is ok.

I do have few git extensions installed, sometimes I endup with mistakes like this. Thanks for reviewing it.

Copy link
Contributor

@aminvakil aminvakil left a comment

Choose a reason for hiding this comment

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

Thank you for doing this!

@ssbarnea ssbarnea merged commit 2bb568c into master Mar 3, 2021
@ssbarnea ssbarnea deleted the 0/wip branch March 3, 2021 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants