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

fix: this is an alternative approach to get the test suite working. I… #95

Closed

Conversation

benjam-es
Copy link
Contributor

@benjam-es benjam-es commented Jan 13, 2025

First

Please check #92 first as I believe this prevents future problems for other users

What:

  • Bug Fix

Description:

When running the test suite locally, my home directory is atum which is seen as a mis-spelling. As we usually exclude that part of the directory elsewhere, this issue only arrises on the constant check within the Cache class.

Screenshot 2025-01-13 at 09 31 35

In #92, I add ignore words to the spell checker for the home directory to prevent this happening. In this PR, we simply extract it out.

Related:

This is an alternative approach to the PR: #92

@c0nst4ntin
Copy link
Collaborator

@benjam-es I don't really understand what this fixes? You simply moved the __DIR__ to a new function? What is the benefit?

@benjam-es
Copy link
Contributor Author

@c0nst4ntin please see #92

On my machine, it is finding a spelling error within my home directory (which is the project path)

/Users/atum/Code/packages/peck

I can't recreate this in a test, but I imagine #92 is the best fix and future proofs for other users that will face the same issue.

I hit the problem simply by running the test suite locally with the new Preset files

@c0nst4ntin
Copy link
Collaborator

@benjam-es Okay, I didn't get why this also changes it. But I guess it's the fact that the __DIR__ in the constant gets evaluated before the constant gets checked by reflection so we check the path? It was unclear to me, that this was the problem.

In this case I think this is an easy way to solve this.

@c0nst4ntin c0nst4ntin added bug Something isn't working duplicate This issue or pull request already exists and removed bug Something isn't working labels Jan 13, 2025
…n Peck - ensure the project directory is not within the const of the preset provider

Signed-off-by: Ben James <[email protected]>
@benjam-es benjam-es force-pushed the fix/skip-checking-home-directory-v2 branch from 07cf017 to b56796b Compare January 18, 2025 16:14
@benjam-es
Copy link
Contributor Author

Closing as duplicate for now

@benjam-es benjam-es closed this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants