Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@officient/readable

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@officient/readable

PHP code linter

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

readable

PHP code analyzer, similar to eslint, but with a focus on readability. The idea is to build an analyzer that can guarantee long term code maintainability for a project. The main project values are extendibility, ease of use, speed of analysis and simplicity.

quick links: Rules and default configuration

codecov

Tests

Installation and Usage

You can install readable using npm:

$ npm install officient/readable#master --save-dev

While developing you can update to latest master with

$ npm uninstall readable && npm install officient/readable#master

You should then set up a configuration file:

$ npx readable --init

After that, you can run readable on any file or directory like this:

$ npx readable

Exit code

Returns 0 if no errors. Returns 1 if there are some errors. Can return 2 if some exception happend during linting.

Configuration

After running readable --init, you'll have a .readable.json file in your directory. In it, you'll see some rules configured like this:

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

Baseline

Create baseline file:

$ npx readable --save-base-line .baseline.json

Add "baseline" param to your .readable.json:

{
  "baseline": ".baseline.json",
  "pathes": [
    "src/"
  ],
  "rules": {}
}

Now errors from baseline file would be ignored. If you want to see all errors run with --disable-base-line flag:

$ npx readable --disable-base-line

Rules

See Rules and default configuration for default rules. Or read how to create a custom rule.

Development

To lint code run:

npm run lint

To fix lint:

npm run fix

To test:

npm run test

To update api docs:

npm run docs

FAQs

Package last updated on 21 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc