You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if this bug is restricted to Java and the "fields" count metric. In Java, a source file can only have 1 public class defined in it with the same name as the file. However, it is possible to define more than 1 class in the file if the other classes are not public. Unsure if this is common. If not, and if restricted to Java, this is a relatively minor bug.
What happened?
With a Java source file defined as follows (note that both classes define
foo
andbar
as fields):Running
qlty metrics --all
reports only 4 fields even though 6 fields are present.Changing the source file to one with 6 uniquely named fields across the classes:
correctly reports 6 fields.
I'm unsure if this bug is restricted to Java and the "fields" count metric. In Java, a source file can only have 1 public class defined in it with the same name as the file. However, it is possible to define more than 1 class in the file if the other classes are not public. Unsure if this is common. If not, and if restricted to Java, this is a relatively minor bug.
What did you expect to happen?
Count all fields regardless of name
Can you reproduce the problem?
Yes, consistently
CLI Version
qlty 0.466.0 macos-arm64 (354ff80 debug 2025-01-03)
Relevant log output
The text was updated successfully, but these errors were encountered: