Git Product home page Git Product logo

phpcs-gitlab's People

Contributors

dependabot[bot] avatar micheh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

zhukovra ovissse

phpcs-gitlab's Issues

Contribute to phpcs upstream

Hello!

First of all, thank you for this great piece of code, works beautifully.

What do you think about opening a PR to squizlabs/PHP_CodeSniffer for including the codeclimate spec?

Basically gitlab is using a subset of it, but still, both would benefit the community and didn't want to steal your work ๐Ÿ™‚

Cheers!
R

PS: found another really cool solution here:

php -dmemory_limit=-1 vendor/bin/phpcs  --report=json . | jq '[.files | keys[] as $file | .[] | .messages | .[] as $msg |  {type: "issue", check_name: $msg.source, categories: ["PHP", "phpcs"], fingerprint: ("\($file):\($msg.line):\($msg.source)"), description: $msg.message, location: { path: $file, lines: {begin: $msg.line, end: $msg.line }}}]'

Change fingerprint to be based on path, check_name, and source

Currently noticed, that gitlab reports old code style errors as new. Turns out that if error moved to different line the fingerprint for it changes as well and gitlab treat it as new code style problem. Did some digging and found out that codeclimate computes fingerprint differently. Instead of relaying on line, they read content of that line and strip whitespaces.
Reference to codeclimate fingerpint pr

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.