Given the file Foo.cs:
internal class Foo
{
}
internal struct Baz
{
}
internal class Bar
{
}
Only the class Bar generates a warning; see screenshot below showing struct Baz does not have green squiggly.

Also, given Baz.cs:
internal struct Baz
{
}
internal class Bar
{
}
internal class Foo
{
}
class Bar does not generate a warning for SA1402

Changing struct Baz to class Baz suddenly makes SA1402 appear for class Bar

Thanks for your feedback.
The described behavior is consistent with the documentation and with the behavior of StyleCop classic, I therefore think it is not a bug.
I will mark this issue as an enhancement request. A possible solution could be to add a configuration field to stylecop.json that instructs SA1402 to also consider structs. Would that work for you?
Absolutely, it's just I found the behaviour surprising. I understand your desire to maintain compatibility with StyleCop classic, however is this a case where the principle of least astonishment might compel you do deviate?
If you change the behavior of the rule or make it configurable I think it should also be renamed to avoid confusion. The current name, SA1402FileMayOnlyContainASingleClass, makes it very obvious that it only applies it classes.
If it is made configurable don't forget interface, enum and delegate.
Maybe this should be a separate rule, that all classes, structs, interface, enums, etc. should be in separate files. I have occasionally had enums in the same file with a class that uses it, but I find that I regret it and eventually move them to a separate file. So :+1: to have some rule that implements this, although not necessarily SA1402.
Duplicate of #1756. We've actually already approved changing the behavior of SA1402 (which would require corresponding documentation updates), but no one has taken it on yet. :smile: