Questions tagged [phplint]

PHPLint is a validator and documentator for PHP 4 and PHP 5 programs.

27 questions
7
votes
4 answers

php -l: suppress output on valid files

When using the php -l myFile.php command (PHP 5.5.30), if the file has a syntax error then I get the proper warnings and stack trace, etc. However, if the file has no syntax warnings I get the message No syntax errors detected in myFile.php Is…
Matthew Herbst
  • 29,477
  • 23
  • 85
  • 128
6
votes
2 answers

How to lint all the files recursive while printing out only files that have an error?

I want to lint all the files in the current (recursive) directory while printing out only files that have an error, and assign a variable to 1 to be used after the linting is finished. #!/bin/bash lint_failed=0 find . -path ./vendor -prune -o -name…
Michael Delle
  • 73
  • 1
  • 7
6
votes
1 answer

CruiseControl - PHP lint check works via ANT but not through CruiseControl

So I am writing an ant buildfile which will be used within cruisecontrol and ran into a weird issue. I've Googled the problem but haven't come across any concrete solutions, so I figured I would post the question here. I have the following ant…
Mike Purcell
  • 19,847
  • 10
  • 52
  • 89
3
votes
1 answer

How to lint or static analysis for only changed files in a branch?

I am using Jenkins and doing PHPMD, PHPCS and PHP lint checks for Pull Requests. What we have is basically a separate branch for each feature and it supposed to merge into the master branch again if it passes checks and tests. We are checking all…
mirza
  • 5,685
  • 10
  • 43
  • 73
3
votes
1 answer

Visual Studio Code and php

Is it possible to use phplint and phpcs with Visual Studio Code editor? It seems that it's possible with Visual Studio Code tasks, is it right? If yes, how? Visual Studio Code Tasks
taher
  • 539
  • 1
  • 9
  • 22
3
votes
1 answer

PHP Code Sniffer Rules

I'm having trouble getting these rules to work: No space after function name: // good public function cities() // bad public function cities () Ensure space between equals: // good $test = 'test'; // bad $test ='test'; $test= 'test'; Must have…
Rob
  • 10,851
  • 21
  • 69
  • 109
3
votes
1 answer

phplint undeclared function

I'm using phplint to check my PHP code. I'm om Windows 8.1 and my editor is Sublime Text 3. Here is a little code snippet of mine:
Dirk
  • 1,020
  • 8
  • 16
2
votes
1 answer

How to give multiple files in exclude?

I am trying to give two folders in --exclude. It just gets one. What I have tried, phplint "C:\laragon\www\customer-service\**\*.php" --exclude="C:\laragon\www\customer-service\vendor,C:\laragon\www\customer-service\node_modules" I have the…
user379888
2
votes
1 answer

PHP on WAMP SERVER - Errors at PHP script

I have a WAMP server on Windows 7. I have a php code like : ...