Giter Club home page Giter Club logo

readable's People

Contributors

denys-potapov avatar illyism avatar willem-delbare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

denys-potapov

readable's Issues

.readable.json with empty rules should override default.readable.json

Issue

Starting a new project with blank rules as below

{
  "pathes": [
    "src/"
  ],
  "rules": {}
}

I think the expected output is that the test will pass. As there is no configuration here that it should extend or include a base config file.

Removing a rule that is now in the default would mean having to set that rule manually to "false". This might be possible but it will cause issues if we add rules in the future, as package users would require to keep up with new rules at every upgrade in orde to disable them.

Fix file-max-size undefined line & column

tokens.current()for file-max-size is { body: '', type: 9 } here:

report(`file contains more than ${maxLines} lines [${lines.size}].`, tokens.current());

making at line ${token.line} column ${token.column} result in at line undefined column undefined.

Maybe just remove the line/column comment in case of file-max-size as it doesn't have a specific ln/col?

Open source

  • Chose license
  • Create github organization
  • Open repo
  • Travis CI (+ badge ?)
  • Public version number (1.0.0 ?)
  • Code of conduct

function-max-size should also allow to exclude comments and empty lines

for file-max-size, we can do this:

    "file-max-size": {
      "max-lines": 200,
      "include-comments": false,
      "include-empty-lines": false
    },

if we do this for function-max-size this doesn't work.
Would it be possible to add this functionality as well? (to avoid including comments/empty lines)

Thanks! :)

Don't count split function parameters as new lines.

Currently, when there's a function with multiple (long) parameters, we write them all on 1 line, because otherwise it would count for the file-max-size-limit we have. Example:

    public function testFunction($one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten)
    {
    }

As you can see, this counts as 3 lines.
What we would like to have is this:

    public function testFunction(
        $one,
        $two,
        $three,
        $four,
        $five,
        $six,
        $seven,
        $eight,
        $nine,
        $ten
    ) {
    }

And still have it count as 3 lines instead of 13

Would that be possible to have an option to handle this?

Thanks!

Make output output paths with line and column included

Before

server/controllers/dashboard/employeeCount.php
  Class have no comment above.
    at line 4 column 5

Proposal

server/controllers/dashboard/employeeCount.php:4:5
  Class have no comment above.

This will allow VSCode to pick it up and open the file directly on the right position.

image

Consider renaming the npm package to readable.php or readable-js

Pros:

  1. It will be shorter than current @officient/readable
  2. It will be easier to google it. Note, when searching for psalm, you anyway need to google for psalm php.

Cons:

  1. Probably will need to create new package, when we add new language to readable (readable-js).

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.