Coder Social home page Coder Social logo

Comments (3)

franciscodua avatar franciscodua commented on June 16, 2024

That's exactly it.

As you can see in the project README, your source directory is mapped to the container's directory /src. Which means the result will be /src/<your code>.

Unfortunately, it's not possible to define a root path when running this tool, which means we cannot ignore the /src part of the absolute path. As you can see in the slevomat's repository there's already an issue related to this problem, but no concrete solution.

As a workaround you can change your configuration file to add src as a directory to skip:

<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
    <properties>
        <property name="rootNamespaces" type="array">
            <element key="src" value="RootNamespace"/>
        </property>
        <property name="skipDirs" type="array" value="src,"/>
    </properties>
    <exclude-pattern>src/namespace/Classname.php</exclude-pattern>
</rule>

I hope this solves you problem and we appreciate your feedback.
Feel free to get back to us if you have any other question or concern.

from codacy-codesniffer.

bkdotcom avatar bkdotcom commented on June 16, 2024

I'll give that solution a try.
Thanks

For now I'm excluding that sniff/check altogether.. Unit tests should expose this issue

from codacy-codesniffer.

franciscodua avatar franciscodua commented on June 16, 2024

You're welcome. I'll close this issue but you can re-open it or create a new one if you have further questions regarding this problem.

from codacy-codesniffer.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.