Hello,
Thanks for this extension!
I'm noticing that if I open a "standalone" .php file (in other words, one that is not contained within a Nova "project" folder), it will always use the PEAR standard, regardless of what I have set in the global settings for the extension in the Extension Library.
But, if I put the same .php file in a folder, then open the folder in Nova, and configure PHPCode_Sniffer in Project Settings to use, say, PSR12, it will do so (after I close and re-open the .php file).
I spoke to Logan about this, and he says:
"Specifically, that preference issue is centered here: https://git.sr.ht/~reykjalin/nova-phpcs/tree/main/item/phpcs.novaextension/Scripts/environment.js#L177
config.selectedStandard() will never return a falsy value."
Thanks for your time!
Steven
Hi Steven!
> I'm noticing that if I open a "standalone" .php file (in other words, one that is not contained within a Nova "project" folder), it will always use the PEAR standard, regardless of what I have set in the global settings for the extension in the Extension Library.
> [...]
> "Specifically, that preference issue is centered here: https://git.sr.ht/~reykjalin/nova-phpcs/tree/main/item/phpcs.novaextension/Scripts/environment.js#L177
> config.selectedStandard() will never return a falsy value."
Thanks for reporting the issue! Logan’s explanation would certainly make it so
the configuration doesn’t work. I’ll try to fix the issue this week, if I have
the time :)
-Kristófer R.
> On May 30, 2023, at 7:55 PM, Steven Frank <stevenf@panic.com> wrote:
>
> Hello,
>
> Thanks for this extension!
>
> I'm noticing that if I open a "standalone" .php file (in other words, one that is not contained within a Nova "project" folder), it will always use the PEAR standard, regardless of what I have set in the global settings for the extension in the Extension Library.
>
> But, if I put the same .php file in a folder, then open the folder in Nova, and configure PHPCode_Sniffer in Project Settings to use, say, PSR12, it will do so (after I close and re-open the .php file).
>
> I spoke to Logan about this, and he says:
>
> "Specifically, that preference issue is centered here: https://git.sr.ht/~reykjalin/nova-phpcs/tree/main/item/phpcs.novaextension/Scripts/environment.js#L177
> config.selectedStandard() will never return a falsy value."
>
> Thanks for your time!
>
> Steven
>