titon / framework

A modular Hack framework that runs on HHVM.
http://titon.io
BSD 2-Clause "Simplified" License
206 stars 23 forks source link

Update code sniffer, code coverage, and more #63

Open milesj opened 9 years ago

milesj commented 9 years ago

While these projects aren't directly a part of the framework, they would be nice to use on/in the codebase.

If possible, we should add HHVM/Hack support to the following projects:

GrahamCampbell commented 9 years ago

I don't see that ever happening. PHP-CS-Fixer is a code base I know quite well, and it's already pretty complex.

milesj commented 9 years ago

That's unfortunate. I'm sure the built-in type checker will cover most use cases regardless.

I'm mostly interested in the CS fixer so that our syntax stays consistent.

milesj commented 9 years ago

Tried testing CS fixer to see what would happen. The code ran without errors but it didn't actually fix anything. Not surprising.

I'll spend some more time on this and see what exactly is going on.

GrahamCampbell commented 9 years ago

The code ran without errors but it didn't actually fix anything. Not surprising.

That's because it's tokenizing the code. Because there's no opening PHP tags, then the file is treated as html by php.

GrahamCampbell commented 9 years ago

I say, html, but you know what I mean. :)

milesj commented 9 years ago

Yeah I figured it was something like that. I'm just curious how different Hack's token_get_all() is compared to PHP's.

GrahamCampbell commented 9 years ago

Were you running php-cs-fixer on hack? If so, it looks like the tokenizer exposed on hack still behaves like the php one, which sucks. I barely use hack, so am not really familiar with it.

milesj commented 9 years ago

I was running php-cs-fixer through HHVM on Hack files. But yeah, haven't dug into it deeper yet.