Closed zapstar closed 5 years ago
Hi @zapstar, thanks for the great report. I saw some similar behaviour with nested message definitions too:
message Outer {
message Inner {
required string value = 1;
}
required Inner inner = 1;
}
Both of these should be addressed by an upcoming refactor, but I'll add your test to make sure that this case gets caught.
When are you planning to refactor? Is it already started? I'm trying to cook up something here on my own. Essentially, I plan to transform the module
node itself with the needed fields. That way the no-member
variable automatically goes away, so does the requirement of having a new error message.
Halfway done, I just haven't been able to find as much time as I would have liked recently. I'll push up a branch if you'd like to follow along. Otherwise, your ideas definitely sound worthwhile, I look forward to hearing how you go.
Please push them into a temporary branch, that'll be helpful. I'm building mostly on top of your parsing code. The core idea I have is to create an astroid ClassDef
with fields
attributes in it so that this gets parsed as a class
in PyLint.
Sorry about the wait @zapstar, you can find it at wip/vars-refactor
.
Hello, I was wondering about the current status of this issue? I'm happy to help if that would be useful.
Hey @seanwarren, I don't think I've made any progress on this. There's an xfail test in tests/test_checker.py::test_complex_field
which you can work off. I'll take another stab at it over the weekend, but feel free to work on it as much as you'd like.
A fix for this issue should be released as 0.6.dev1
This issue should be fixed in 0.6
Consider the example:
Here's the test harness:
Here's the output of running PyLint