Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: php-cs-fixer config file path in sublime-project? #143

Open
hansott opened this issue Oct 8, 2015 · 4 comments
Open

Question: php-cs-fixer config file path in sublime-project? #143

hansott opened this issue Oct 8, 2015 · 4 comments

Comments

@hansott
Copy link

hansott commented Oct 8, 2015

I would like to run php-cs-fixer with the --config-file=.php_cs argument. But it seems that the file is not found. Can I make use of the $project_path variable to get the correct path?

Thanks!

My sublime project file:

{
    "folders": [
         ...
    ],
    "phpcs": {
        "php_cs_fixer_additional_args": {
             "--config-file": ".php_cs"
        }
    }
}
@hansott hansott changed the title Question: php-cs-fixer config file in sublime-project. Question: php-cs-fixer config file path in sublime-project. Oct 8, 2015
@hansott hansott changed the title Question: php-cs-fixer config file path in sublime-project. Question: php-cs-fixer config file path in sublime-project? Oct 8, 2015
@thibaultlavoisey
Copy link

Any news about this issue? Will be nice if sublime-phpcs can detect .php_cs file at project root and use it.

@benmatselby
Copy link
Owner

@thibaultlavoisey @hansott Hi folks.. I don't have a lot of time to look at this at the moment, but I would happily review and merge a pull request

@benmatselby
Copy link
Owner

@hansott @thibaultlavoisey It works if you specify the full file path, but I'm assuming you know that?

@Luc45
Copy link

Luc45 commented Nov 13, 2017

Hello,

I'm trying to set specific rules per project basis, so I tried this:

{
    "folders": [
        {
	    "path": "E:\\laragon\\www\\oldsite"
	}
    ],
    "phpcs": {
        "php_cs_fixer_additional_args": {
             "--config-file": "C:\\Users\\lucas.figueiredo\\.oldphpcsfixer"
        }
    }
}

And this:

    "settings": {
        "phpcs": {
            "phpcs_additional_args": {
                "--config": "C:\\Users\\lucas.figueiredo\\.oldphpcsfixer"
            }
        }
    }

But neither worked.

It seems --config is the argument that PHP CS listens to, according to their documentation. I have limited knowledge, but it seems to be only a matter of passing the --config argument per project basis. Unfortunately I have zero knowledge of Python.

Similar issue:
#32

PS: Thanks for supporting the open-source community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants