This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199526

Summary: Warning on line having hashbang
Product: php Reporter: schkovich <schkovich>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: File having hashbang opened in editor

Description schkovich 2011-06-19 12:33:34 UTC
Created attachment 108979 [details]
File having hashbang opened in editor

Hashbang (#!/usr/bin/php -q) is marked with warning: Non-space characters found without seeing a doctype first. Expected "<!DOCTYPE html>".
From line 1, column 1; to line 2, column 2
(Rule Category: Unexpected characters)

The HTML version of the code cannot be determined. You can set a default value for this project.

Expected: No warning, HTML syntax checking not turned on.
Comment 1 Ondrej Brejla 2012-04-24 14:59:30 UTC
Everything outside PHP delimiters is considered as HTML content. So this will not be easy to implement.
Comment 2 schkovich 2012-04-24 16:11:48 UTC
(In reply to comment #1)
> Everything outside PHP delimiters is considered as HTML content. So this will
> not be easy to implement.

I see. However, you have to admit that assumption is wrong. :)

Disable HTML error checking for this file suppresses the warning (and all following errors). I haven't yet bumped into the case in which I have HTML code in a shell script. Shall we resolve this issue as wont fix?
Comment 3 Ondrej Brejla 2012-04-25 07:48:07 UTC
No, it's a serious P4 enhancement, so let it be...maybe in a time, something "brilliant" will come to my mind, how to solve it ;)