Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Lint against static-only classes #3111

Closed
lambda-fairy opened this issue Aug 10, 2017 · 1 comment
Closed

Lint against static-only classes #3111

lambda-fairy opened this issue Aug 10, 2017 · 1 comment

Comments

@lambda-fairy
Copy link

Users who come from a Java-style OO language may wrap their utility functions in an extra class, instead of putting them at the top level. In this case, they probably should instead use inner namespaces or remove the nesting altogether.

I propose a no-static-only-class rule that warns on

  • a class
  • with only static members
  • which does not:
    • extend another class or implement an interface, or
    • have a non-empty constructor
@ajafff
Copy link
Contributor

ajafff commented Oct 31, 2017

Fixed by #3119

@ajafff ajafff closed this as completed Oct 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants