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 183226 - Editor should flag undefined macro names as errors
Summary: Editor should flag undefined macro names as errors
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@cnd
Depends on:
Reported: 2010-03-30 21:05 UTC by lvskiprof
Modified: 2010-11-12 22:28 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description lvskiprof 2010-03-30 21:05:29 UTC
In the same way the editor reports undefined types/variables/macros/etc. in a C or C++ source file, it should also do the same for makefile/Makefile files.

This is especially useful when modifying an old or crafting a new makefile, because make silently fails undefined macros and simply places an empty string there.  This can cause strange behavior when the makefile is run that can be hard to identify as lines go scrolling off the screen at 100 miles an hour.  Even spotting it in captured output can be difficult at times.

Just flagging it with a red underline, as is done in the C source code editor would greatly enhance it's usefulness in editing a makefile.

A red indicator for the line that says why it is flagged would also be expected.

I did notice that a few times when I used $< that it knew it was illegal, but the only indication is if you put the insertion point right after the '<', in which case it turns it red.  But this should also be underlined as illegal and have a red indicator explaining why on the left side.
Comment 1 Alexey Vladykin 2010-05-21 09:14:05 UTC
We can't unconditionally mark undefined macros as errors. Undefined macros are perfectly OK, they just expand to empty string. Also macros can be specified on make invocation, i.e. `make FOO=bar BAR=baz target-name`, and the parser does not know that in advance.

The angle bracket in $< macro is highlighted by braces matcher (general editor feature). It just means that there is no corresponding right angle bracket ">".