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

Allow parameter force-slug #645

Conversation

davidperezgar
Copy link
Member

@davidperezgar davidperezgar commented Sep 18, 2024

Fixes #644 and it's related with PR #480

This is a first approach to solve this issue. It works.

What I see is that phpcs allows to force the text_domain with a slug. It can be done like explained here with the parameters:
--runtime-set text_domain desired-slug
So, we need to allow a new argument in PHPCS, and set the slug to check.

@davidperezgar davidperezgar linked an issue Sep 18, 2024 that may be closed by this pull request

global $argv;
$slug_prefix = '--force-slug=';
$result = array_filter(
Copy link
Member

Choose a reason for hiding this comment

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

I not liking this approach of fetching global arguments inside the check. May be we should save this new slug globally with which we can access from any checks. We need this value in other checks also.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, How could I make it?

@davidperezgar
Copy link
Member Author

I see that @ernilambar approach is better than mine in the PR #650 . So Let's close it!

@davidperezgar davidperezgar removed this from the 1.2.0 milestone Sep 20, 2024
@ernilambar ernilambar deleted the 644-new-parameter-in-cli-to-specify-the-correct-slug branch October 20, 2024 09:11
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.

New parameter in CLI to specify the correct slug
2 participants