NOLINT becoming less effective over time?

Hi,

Is it just me or is // NOLINT not doing a whole lot these days?

It used to turn off the warning underlines in source code, but these days only infrequently seems to work. The latest example I've encountered is:

```
auto buf = std::malloc(sizeof(SlotList) + sizeof(SlotTy*) * (capacity - 1));    // NOLINT (memory is for in place ctor)

```

This results in an ‘Allocated Memory is Leaked’ warning, even with the NOLINT, but in this case it's OK, I (more or less) know what I'm doing. But of course I don't want to disable this warning globally.

Ditto with many other warnings, I'm sure it used to be easier to NOLINT out of these…even if not, IMO it should be.

Is it because the warnings are coming from different sources? Is there a setting that says which sources can be disabled via // NOLINT? Is there a new way to do NOLINT per statement?

Bye!
Mark
 

 

0

请先登录再写评论。