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

VSCode PR diffs #1614

Open
mikebronner opened this issue Sep 1, 2023 · 0 comments
Open

VSCode PR diffs #1614

mikebronner opened this issue Sep 1, 2023 · 0 comments
Labels

Comments

@mikebronner
Copy link

When reviewing PRs in VSCode, I get the following linter error:

Class name App\Actions\MyAction does not match filepath STDIN.
(SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName)phpcs

I believe this is due to the diffed files being displayed from memory. Is there a recommended way to set up the linter to not throw errors for this circumstance?

I have tried the following rule, but not quite sure how to structure the rule, as it basically needs to apply to any namespace:

	<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
        <properties>
            <property name="rootNamespaces" type="array">
                <element key="STDIN" value="App"/>
                <element key="tests" value="ValmarCodingStandard\Tests"/>
            </property>
        </properties>
    </rule>

Thanks for your assistance!

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

No branches or pull requests

2 participants