Download the PHP package armin/editorconfig-cli without Composer

On this page you can find all versions of the php package armin/editorconfig-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package editorconfig-cli

Editorconfig Checker for CLI

Code Checks

EditorConfigCLI (binary called ec) is a free command-line-interface tool (written in PHP) to validate and auto-fix text files based on given .editorconfig declarations.

This allows you to automatically ensure .editorconfig declarations during your CI and development processes.

armin/editorconfig-cli is released under MIT license.

Written by Armin Vieweg <https://v.ieweg.de>

Requirements

If you are looking for older PHP version support, you can check out and use those tags:

Installation

To install the EditorConfigCLI tool you need to download a handy PHAR executable, or use Composer like this:

Tip: You can also install packages globally with Composer (using the composer global command).

To download the PHAR executables, check out the releases section here.

What is EditorConfig?

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs.

Which coding styles should get applied, are configured in the .editorconfig file.

You'll find more info about syntax and features of EditorConfig on https://editorconfig.org

Screenshots

This screenshot shows the help page you get when calling ec --help:

Here you see two example runs:

Features

Usage

Composer style:

PHAR style:

Scanning

When you do not enter any options, the scan starts immediately when calling ec PHP binary.

EditorConfigCLI supports three different modes to find files to check for:

  1. By CLI arguments and options, which configures and utilizes a symfony/finder instance (used by default).

    Note: No dotted files and directories are getting scanned (e.g. .ddev/ or .htaccess). Also, files covered by root .gitignore file, will be automatically excluded from scan.

  2. Using local Git binary, to get all files known Git. CLI args and options are ignored, then. (--git-only)

  3. Using a custom finder instance, which you can provide via a separate PHP file (--finder-config).

Fixing

To apply automatic fixes after scan append the --fix (or -f) option.

Currently, two rules do not support auto-fixing:

You get a notice for this in result output, when such issues occur.

CLI

Argument

Name(s) of file names to get checked. Wildcards allowed. Default: ['*']

With this you can only scan certain file types, e.g.

Options

The ec binary supports the following options:

Option Shortcut Description
--dir | -d Define the directory to scan. By default, the current working directory is used.
--exclude | -e Directories to exclude from scan. Multiple values are allowed.
--disable-auto-exclude | -a Disables exclusion of files ignored by root .gitignore file (when given).
--git-only | -g Ignores all excludes and scans for all files known to Git. Requires git binary to be present.
--git-only-cmd | | Allows you to modify the git command (incl. binary) to get file list. Default: git ls-files
--finder-config Allows to define a PHP file providing a custom Finder instance. Read more
--skip | -s Disables rules by name. Multiple and comma-separated values are allowed. See rules list below.
--strict When set, given indention size is forced during scan and fixing. This might conflict with more detailed indention rules, checked by other linters and style-fixers in your project.
--compact | -c Only shows only files with issues, not the issues itself.
--uncovered | -u Lists all files which are not covered by .editorconfig.
--verbose | -v Shows additional informations, like detailed info about internal time tracking and which binary files have been skipped.
--no-interaction | -n Do not ask for confirmation, if more than 500 files found and continue scanning. Always returns error code 3, when not confirming.
--no-error-on-exit | | By default ec returns code 2 when issues or code 1 when warnings occurred. With this option set return code is always 0.

Tip: The "usage" section on ec's help page shows some examples.

Rules list

The following rules are being executed by default and could get disabled using the --skip (-s) option:

Support and Contribution

Do you have questions, issues or feature requests? Checkout the issue tracker on Github.

If you like this project, you are invited to donate some help to support further development. Thank you!

In case you want to contribute code, checkout the Contribution guide for developers.

Changelog

See here


All versions of editorconfig-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-iconv Version *
symfony/console Version ^5 || ^6 || ^7
symfony/finder Version ^5 || ^6 || ^7
symfony/mime Version ^5 || ^6 || ^7
idiosyncratic/editorconfig Version ^0.1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package armin/editorconfig-cli contains the following files

Loading the files please wait ....