SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

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