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 271298 - Clank hints: user can't switch off 1 of Clank hints (or modify hint type)
Summary: Clank hints: user can't switch off 1 of Clank hints (or modify hint type)
Status: REOPENED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-15 12:05 UTC by soldatov
Modified: 2017-08-21 13:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
coverage.c sample file (2.44 KB, text/x-csrc)
2017-08-17 15:39 UTC, Maria Tishkova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2017-08-15 12:05:11 UTC
1st scenario;
- create C++ project with such code:

int main(int argc, char** argv) {
    int i = 1/0;
    int a[2];
    a[4] = 1;
    return 0;
}
- call Options window
- select Editor > Hints > C/C++
- switch off all Clank hints
- switch on 'core.VLASize' hint
- press OK button
- close file, open file again
==> I see both Clank hints.
Expected result: 0 hints.
Comment 1 soldatov 2017-08-15 12:08:25 UTC
2nd scenario;
- create C++ project with such code:

int main(int argc, char** argv) {
    int i = 1/0;
    int a[2];
    a[4] = 1;
    return 0;
}
- call Options window
- select Editor > Hints > C/C++
- switch off all Clank hints
- switch on 'core.DivideZero' hint
- Select 'Error' type in "Show As" listbox
- press OK button
- close file, open file again
==> I see 2 warnings.
Expected result: 1 error.
Comment 2 Maria Tishkova 2017-08-17 15:38:05 UTC
Invalid.

works as expected. clang works the same way for the given example.

To check use attached file.
1. Turn off all except  "unix.Malloc" -> you will see 6 warning
2. Turn on "core" -> 9 warnings
Comment 3 Maria Tishkova 2017-08-17 15:39:06 UTC
Created attachment 164969 [details]
coverage.c sample file
Comment 4 soldatov 2017-08-18 09:45:07 UTC
(In reply to Maria Tishkova from comment #2)
> 1. Turn off all except  "unix.Malloc" -> you will see 6 warning
true
> 2. Turn on "core" -> 9 warnings
true

Turn on all hints -> no warnings
Comment 5 soldatov 2017-08-18 10:07:37 UTC
also alpha.valist checker breaks other checkers

3rd scenario:
- Switch on all Clank hints
- Open coverage.c file
==> no any warnings!!!
- Switch off alpha.valist hint
==> a lot of warnings
Comment 6 Maria Tishkova 2017-08-21 13:15:17 UTC
(In reply to soldatov from comment #5)
> also alpha.valist checker breaks other checkers
> 
> 3rd scenario:
> - Switch on all Clank hints
> - Open coverage.c file
> ==> no any warnings!!!
> - Switch off alpha.valist hint
> ==> a lot of warnings

The behavior is the same as clang has. it is not clear what to do in such cases. there are unit tests in clang that checks that 3 checkers will produce less errors..