[PHP] False positive on php:S1997 - Files should not contain inline HTML ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PHP] False positive on php:S1997 - Files should not contain inline HTML ?

David RACODON
Hi,

On the attached file, a php:S1997 - Files should not contain inline HTML is raised.
What is "inline HTML" in this file?

Thank you

Regards,

David RACODON
Freelance QA Consultant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

file.phtml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PHP] False positive on php:S1997 - Files should not contain inline HTML ?

Linda Martin
Hello,

"inline HTML" corresponds to the HTML code which is present with the PHP code.
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP. 
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

Regards,

Linda.

On 6 May 2015 at 14:49, David Racodon <[hidden email]> wrote:
Hi,

On the attached file, a php:S1997 - Files should not contain inline HTML is raised.
What is "inline HTML" in this file?

Thank you

Regards,

David RACODON
Freelance QA Consultant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: [PHP] False positive on php:S1997 - Files should not contain inline HTML ?

David RACODON
Hi,

"inline HTML" corresponds to the HTML code which is present with the PHP code.

OK. We are aligned on this.
 
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP.
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

This rule should be activated on .php files. But it should be deactivated by default on .phtml files. You shouldn't have to set exclusions on .phtml files for this rule as .phtml files are intended to mix PHP and HTML code. Does that make sense?

Thank you

Regards,

David RACODON
Freelance QA Consultant

On Tue, May 19, 2015 at 10:38 AM, Linda Martin <[hidden email]> wrote:
Hello,

"inline HTML" corresponds to the HTML code which is present with the PHP code.
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP. 
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

Regards,

Linda.

On 6 May 2015 at 14:49, David Racodon <[hidden email]> wrote:
Hi,

On the attached file, a php:S1997 - Files should not contain inline HTML is raised.
What is "inline HTML" in this file?

Thank you

Regards,

David RACODON
Freelance QA Consultant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: [PHP] False positive on php:S1997 - Files should not contain inline HTML ?

Linda Martin
Here is the ticket SONARPHP-466 to exclude ".phtml" files from this rule. 
But the scope will not be limited to ".php" files only as full php files can have any extension.
This should be up to user configuration.

Best regards,

Linda.

On 19 May 2015 at 10:53, David Racodon <[hidden email]> wrote:
Hi,

"inline HTML" corresponds to the HTML code which is present with the PHP code.

OK. We are aligned on this.
 
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP.
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

This rule should be activated on .php files. But it should be deactivated by default on .phtml files. You shouldn't have to set exclusions on .phtml files for this rule as .phtml files are intended to mix PHP and HTML code. Does that make sense?

Thank you

Regards,

David RACODON
Freelance QA Consultant

On Tue, May 19, 2015 at 10:38 AM, Linda Martin <[hidden email]> wrote:
Hello,

"inline HTML" corresponds to the HTML code which is present with the PHP code.
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP. 
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

Regards,

Linda.

On 6 May 2015 at 14:49, David Racodon <[hidden email]> wrote:
Hi,

On the attached file, a php:S1997 - Files should not contain inline HTML is raised.
What is "inline HTML" in this file?

Thank you

Regards,

David RACODON
Freelance QA Consultant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|

Re: [PHP] False positive on php:S1997 - Files should not contain inline HTML ?

David RACODON
Here is the ticket SONARPHP-466 to exclude ".phtml" files from this rule. 

Thanks 

But the scope will not be limited to ".php" files only as full php files can have any extension. This should be up to user configuration.

Obviously. I meant all files other than .phtml files. 


David RACODON
Freelance QA Consultant

On Tue, May 19, 2015 at 2:15 PM, Linda Martin <[hidden email]> wrote:
Here is the ticket SONARPHP-466 to exclude ".phtml" files from this rule. 
But the scope will not be limited to ".php" files only as full php files can have any extension.
This should be up to user configuration.

Best regards,

Linda.

On 19 May 2015 at 10:53, David Racodon <[hidden email]> wrote:
Hi,

"inline HTML" corresponds to the HTML code which is present with the PHP code.

OK. We are aligned on this.
 
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP.
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

This rule should be activated on .php files. But it should be deactivated by default on .phtml files. You shouldn't have to set exclusions on .phtml files for this rule as .phtml files are intended to mix PHP and HTML code. Does that make sense?

Thank you

Regards,

David RACODON
Freelance QA Consultant

On Tue, May 19, 2015 at 10:38 AM, Linda Martin <[hidden email]> wrote:
Hello,

"inline HTML" corresponds to the HTML code which is present with the PHP code.
The example you gave is not a false-positive as this rule is meant to detect HTML mixed with PHP. 
As it is a convention rule, this rule should be activate only if one project have the convention to separated HTML and PHP in different files.

Regards,

Linda.

On 6 May 2015 at 14:49, David Racodon <[hidden email]> wrote:
Hi,

On the attached file, a php:S1997 - Files should not contain inline HTML is raised.
What is "inline HTML" in this file?

Thank you

Regards,

David RACODON
Freelance QA Consultant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email