SlideShare una empresa de Scribd logo
1 de 11
LINT
                                       PHP & JavaScript Code Checkers




Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
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
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
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
PHPLint
                 • http://www.icosaedro.it/phplint/
                 • Windows & Unix




Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
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
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: 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
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
                 • You’re on your own for logical errors

Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
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

Más contenido relacionado

Similar a Lint - PHP & Javascript Code Checking

Cufon - Javascript Font Replacement
Cufon - Javascript Font ReplacementCufon - Javascript Font Replacement
Cufon - Javascript Font Replacement
Dave Ross
 
LAMP Optimization
LAMP OptimizationLAMP Optimization
LAMP Optimization
Dave Ross
 
Profiling PHP & Javascript
Profiling PHP & JavascriptProfiling PHP & Javascript
Profiling PHP & Javascript
Dave Ross
 
PHP Output Buffering
PHP Output BufferingPHP Output Buffering
PHP Output Buffering
Dave Ross
 
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
Paris Open Source Summit
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 

Similar a Lint - PHP & Javascript Code Checking (20)

Cufon - Javascript Font Replacement
Cufon - Javascript Font ReplacementCufon - Javascript Font Replacement
Cufon - Javascript Font Replacement
 
LAMP Optimization
LAMP OptimizationLAMP Optimization
LAMP Optimization
 
.NET Core, ASP.NET Core e .NET Standard 2
.NET Core, ASP.NET Core e .NET Standard 2.NET Core, ASP.NET Core e .NET Standard 2
.NET Core, ASP.NET Core e .NET Standard 2
 
Hanami
HanamiHanami
Hanami
 
Profiling PHP & Javascript
Profiling PHP & JavascriptProfiling PHP & Javascript
Profiling PHP & Javascript
 
COSCUP 2016 - ROS + Gazebo機器人模擬器工作坊
COSCUP 2016 - ROS + Gazebo機器人模擬器工作坊COSCUP 2016 - ROS + Gazebo機器人模擬器工作坊
COSCUP 2016 - ROS + Gazebo機器人模擬器工作坊
 
Invalidating copyright infringement claims
Invalidating copyright infringement claims Invalidating copyright infringement claims
Invalidating copyright infringement claims
 
PHP Output Buffering
PHP Output BufferingPHP Output Buffering
PHP Output Buffering
 
The new era of PHP web development.
The new era of PHP web development.The new era of PHP web development.
The new era of PHP web development.
 
O Futuro do C#: C#8
O Futuro do C#: C#8O Futuro do C#: C#8
O Futuro do C#: C#8
 
IronRuby for the .NET Developer
IronRuby for the .NET DeveloperIronRuby for the .NET Developer
IronRuby for the .NET Developer
 
Conferences andcommunity
Conferences andcommunityConferences andcommunity
Conferences andcommunity
 
GDSC NYCU | 如何建立自己的開源專案
 GDSC NYCU | 如何建立自己的開源專案 GDSC NYCU | 如何建立自己的開源專案
GDSC NYCU | 如何建立自己的開源專案
 
Rpi
RpiRpi
Rpi
 
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
EOLE / OWF 12 - The affero gp lv3. why it exists and who it's for - bradley m...
 
Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of software
 
Week01 jan19
Week01 jan19Week01 jan19
Week01 jan19
 
Linq (from the inside)
Linq (from the inside)Linq (from the inside)
Linq (from the inside)
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
 
TypePad Platform FOWA London 2009
TypePad Platform FOWA London 2009TypePad Platform FOWA London 2009
TypePad Platform FOWA London 2009
 

Más de Dave Ross

Stylesheets of the future with Sass and Compass
Stylesheets of the future with Sass and CompassStylesheets of the future with Sass and Compass
Stylesheets of the future with Sass and Compass
Dave Ross
 
Date and Time programming in PHP & Javascript
Date and Time programming in PHP & JavascriptDate and Time programming in PHP & Javascript
Date and Time programming in PHP & Javascript
Dave Ross
 
Web App Security: XSS and CSRF
Web App Security: XSS and CSRFWeb App Security: XSS and CSRF
Web App Security: XSS and CSRF
Dave Ross
 

Más de Dave Ross (20)

Stylesheets of the future with Sass and Compass
Stylesheets of the future with Sass and CompassStylesheets of the future with Sass and Compass
Stylesheets of the future with Sass and Compass
 
HTML5 History & Features
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & Features
 
A geek's guide to getting hired
A geek's guide to getting hiredA geek's guide to getting hired
A geek's guide to getting hired
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
 
Date and Time programming in PHP & Javascript
Date and Time programming in PHP & JavascriptDate and Time programming in PHP & Javascript
Date and Time programming in PHP & Javascript
 
Simulated Eye Tracking with Attention Wizard
Simulated Eye Tracking with Attention WizardSimulated Eye Tracking with Attention Wizard
Simulated Eye Tracking with Attention Wizard
 
What's new in HTML5?
What's new in HTML5?What's new in HTML5?
What's new in HTML5?
 
The Canvas Tag
The Canvas TagThe Canvas Tag
The Canvas Tag
 
Wordpress
WordpressWordpress
Wordpress
 
Lamp Stack Optimization
Lamp Stack OptimizationLamp Stack Optimization
Lamp Stack Optimization
 
The FPDF Library
The FPDF LibraryThe FPDF Library
The FPDF Library
 
FirePHP
FirePHPFirePHP
FirePHP
 
Bayesian Inference using b8
Bayesian Inference using b8Bayesian Inference using b8
Bayesian Inference using b8
 
SQL Injection in PHP
SQL Injection in PHPSQL Injection in PHP
SQL Injection in PHP
 
Web App Security: XSS and CSRF
Web App Security: XSS and CSRFWeb App Security: XSS and CSRF
Web App Security: XSS and CSRF
 
Google Maps API
Google Maps APIGoogle Maps API
Google Maps API
 
Everything You Need to Know in Order to Start Using jQuery
Everything You Need to Know in Order to Start Using jQueryEverything You Need to Know in Order to Start Using jQuery
Everything You Need to Know in Order to Start Using jQuery
 
Subversion
SubversionSubversion
Subversion
 
PHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing FrameworkPHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing Framework
 
Apache mod_rewrite
Apache mod_rewriteApache mod_rewrite
Apache mod_rewrite
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Lint - PHP & Javascript Code Checking

  • 1. LINT PHP & JavaScript Code Checkers Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  • 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. 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. 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. PHPLint • http://www.icosaedro.it/phplint/ • Windows & Unix Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  • 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. PHPLint On-Line Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  • 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. Lint :: Dave Ross :: Suburban Chicago PHP & Web Design Meetup :: suburbanchicagophp.org :: Sept 3, 2009
  • 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. 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