LINT
                                       PHP & JavaScript Code Checkers




Lint :: Dave Ross :: Suburban Chicago PHP &...
History of Lint

                 • Bell Labs, Late 1970s
                 • First public appearance Unix V7 (1979)
      ...
Static Code Analysis

                 • Analyzes code without executing it
                 • Detects syntax errors (miss...
PHP -l

                 • PHP’s built-in Lint tool
                 • Command-line tool
                 • php -l somefile...
PHPLint
                 • http://www.icosaedro.it/phplint/
                 • Windows & Unix




Lint :: Dave Ross :: Sub...
PHPLint On-Line

                 •      http://www.icosaedro.it/phplint/phplint-on-line.html

                 • Only che...
PHPLint On-Line




Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
JSLint by Doug Crockford
                 • JavaScript Lint tool
                 • jslint.com
                 • “Warning...
Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
Not Psychic

                 • Lint tools wont find every error
                 • They’ll find technical errors
          ...
Any Questions?

        Dave Ross
        PHP & Javascript developer
        WordPress plugin developer
        http://dav...
Upcoming SlideShare
Loading in …5
×

Lint - PHP & Javascript Code Checking

9,543 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
9,543
On SlideShare
0
From Embeds
0
Number of Embeds
43
Actions
Shares
0
Downloads
46
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Lint - PHP & Javascript Code Checking

  1. 1. LINT PHP & JavaScript Code Checkers Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  2. 2. History of Lint • Bell Labs, Late 1970s • First public appearance Unix V7 (1979) • Written for C language • Named for bits of crud in sheeps’ wool Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  3. 3. Static Code Analysis • Analyzes code without executing it • Detects syntax errors (missing semicolons, missing curly braces) • Detects some bugs & unsafe code Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  4. 4. PHP -l • PHP’s built-in Lint tool • Command-line tool • php -l somefile.php • Same code PHP uses to parse code at runtime Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  5. 5. PHPLint • http://www.icosaedro.it/phplint/ • Windows & Unix Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  6. 6. PHPLint On-Line • http://www.icosaedro.it/phplint/phplint-on-line.html • Only checks one file at a time • Can’t check dependencies Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  7. 7. PHPLint On-Line Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  8. 8. JSLint by Doug Crockford • JavaScript Lint tool • jslint.com • “Warning: JSLint will hurt your feelings” • Detects really obscure JavaScript errors • See “JavaScript: The Good Parts” http://www.youtube.com/watch? v=hQVTIJBZook Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  9. 9. Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  10. 10. Not Psychic • Lint tools wont find every error • They’ll find technical errors • You’re on your own for logical errors Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  11. 11. Any Questions? Dave Ross PHP & Javascript developer WordPress plugin developer http://daveross.tel http://davidmichaelross.com Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009

×