scheck chokes on specific php file. #34

Closed
rgrinberg opened this Issue Jul 11, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@rgrinberg

PHP file appears to syntax check but fails with scheck.
Here's the file:
https://github.com/sourcefabric/Airtime/blob/master/airtime_mvc/application/models/airtime/Common.php

Error is:
PB with file/path.php, exn = Parse_php.Parse_error(_)

@rjha

This comment has been minimized.

Show comment Hide comment
@rjha

rjha Oct 17, 2012

Me too.

Details

Linux Mint 13 (based on Ubuntu 12.04 LTS)

git clone git://github.com/facebook/pfff.git
cd pfff/
sudo aptitude install ocaml
sudo aptitude install libpcre3-dev
sudo aptitude install binutils-gold
./configure -nogui -novisual
make depend
make
./scheck ~/code/github/sc/lib/com/indigloo/sc/html/

errors like
PB with /home/rjha/code/github/sc/lib/com/indigloo/sc/html/Group.php, exn = Parse_php.Parse_error(_)

rjha commented Oct 17, 2012

Me too.

Details

Linux Mint 13 (based on Ubuntu 12.04 LTS)

git clone git://github.com/facebook/pfff.git
cd pfff/
sudo aptitude install ocaml
sudo aptitude install libpcre3-dev
sudo aptitude install binutils-gold
./configure -nogui -novisual
make depend
make
./scheck ~/code/github/sc/lib/com/indigloo/sc/html/

errors like
PB with /home/rjha/code/github/sc/lib/com/indigloo/sc/html/Group.php, exn = Parse_php.Parse_error(_)

@rjha

This comment has been minimized.

Show comment Hide comment
@rjha

rjha Nov 23, 2012

pfff dump gives more clue

rjha@crunchbang12:~/sw/pfff$ ./pfff -dump_php ~/code/github/sc/web/index.php
(ONCE) LEXER:unrecognised symbol, in token rule:
Fatal error: exception Parse_php.Parse_error(_)

The error seems to be due to namespace declaration in file. (e.g. use \com\X\Y\Z )

rjha commented Nov 23, 2012

pfff dump gives more clue

rjha@crunchbang12:~/sw/pfff$ ./pfff -dump_php ~/code/github/sc/web/index.php
(ONCE) LEXER:unrecognised symbol, in token rule:
Fatal error: exception Parse_php.Parse_error(_)

The error seems to be due to namespace declaration in file. (e.g. use \com\X\Y\Z )

@rjha

This comment has been minimized.

Show comment Hide comment
@rjha

rjha Nov 23, 2012

@rgrinberg can you please see if you get this error due to namespaces? if yes, then this issue should be closed as a duplicate of #17

rjha commented Nov 23, 2012

@rgrinberg can you please see if you get this error due to namespaces? if yes, then this issue should be closed as a duplicate of #17

@aryx

This comment has been minimized.

Show comment Hide comment
@aryx

aryx Aug 15, 2013

Contributor

I can't file the reference to the file mentioned above. I guess it was a namespace issue and it has been fixed so I close this issue.

Contributor

aryx commented Aug 15, 2013

I can't file the reference to the file mentioned above. I guess it was a namespace issue and it has been fixed so I close this issue.

@aryx aryx closed this Aug 15, 2013

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