Code Monkey home page Code Monkey logo

editorconfig-cli's People

Contributors

a-r-m-i-n avatar eliashaeussler avatar

Stargazers

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

Watchers

 avatar

editorconfig-cli's Issues

Drop PHP 7.4, 8.0 and 8.1 support, ensure PHP 8.3 support

Because PHP 7.4 support is already over, this version does not need to get supported anymore. Same goes for PHP 8.0, which is about to end. Thinking about to raising the required PHP version to 8.2 and release all this with new major version 2.0.0.

Also, PHP 8.3 is out, so the automated tests should cover this case.

And, thanks to new PHP 8 features, some code refactorings should also get applied. And Symfony v7 components should also get supported.

Strict Mode for file types

Currently, the strict mode can only get applied to all or none files. Some file types, like JSON or YAML should always get indented as defined, because there are no special linters (eg. JS or PHP) which allow exceptions.

So, instead of making strict mode option boolean, it should get converted to a string, which allows to define a comma-separated list of file patterns, which should have strict mode enabled.

Then, those variants of using the option exist:

  • No strict mode option given (= strict mode off)
  • Strict mode given with empty string (= strict mode on)
  • Strict mode given with comma separated string (=strict mode only applies to given file patterns)

Version 1.2.0 removes all line feeds (LF)

Hi Armin,

I just used version 1.2.0 on my code base with this config:

# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = LF
insert_final_newline = true
trim_trailing_whitespace = true

[*.php]
indent_style = space
indent_size = 4

After "fixing" my code base, all line feeds are removed, i.e. all files only contain 1 line afterwards. Example:

<?php

declare(strict_types=1);

namespace App\Controller;

...

is squashed into one line like this:

<?phpdeclare(strict_types=1);namespace App\Controller;...

Any idea what might be the issue?

Have a nice day,
Alex

Allow CLI options and arguments to get outsourced to config file

Currently it is not possible to define all options and argument in a separate file. This feature would change that.

Then, all options and arguments can get defined there and the call for EditorConfigCLI would be: vendor/bin/ec --config path/to/ec-config.php

Additionally it would be handy, if some of those options could get overwritten, by the actual CLI args. To unset already set options by CLI args, a new "unset" option becomes necessary. The possibility to override settings from new config file, should be disableable in the config file itself.

To make it more transparent and reliable, Editor Config CLI should provide a Configuration class, utilized by internals and by the outsourced configuration file.

Canceling interaction mode does not return error code

When having more than 500 files and the -n option is not given, a run in a CI pipeline will not cause an error, because code 0 is being returned then.

This behavior should change to return an error code (1 or 2) in order to let the build fail, because no checks are performed then.

Validate method of rules return bool, without an effect

The validate method of any rule can return true or false. But this value is not taking into account. Instead, the isValid() method is being checked, which returns true when no error has been added during scan.

To reduce confusion and increase code quality the validate method of rules should not return any value anymore.

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.