vip-scanner icon indicating copy to clipboard operation
vip-scanner copied to clipboard

Flag common misuse of output functions

Open nickdaugherty opened this issue 10 years ago • 1 comments

The return value of functions that output should generally not be used. Things like:

echo bloginfo( 'name' );
echo the_title();
echo wp_title();
echo esc_html( printf( ... ) );
echo esc_url( the_permalink() );

nickdaugherty avatar Nov 17 '14 19:11 nickdaugherty

Might be more efficient to figure out the return value with static analysis and anything that returns void or not a string maybe should be flagged.

sboisvert avatar Jan 27 '15 19:01 sboisvert