Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal/RequireFinalClass: various tweaks #164

Merged
merged 3 commits into from
Dec 1, 2022

Commits on Dec 1, 2022

  1. Configuration menu
    Copy the full SHA
    5d9f631 View commit details
    Browse the repository at this point in the history
  2. Universal/RequireFinalClass: always record the metric

    As things were, the sniff would bow out if the opening brace for the class could not be found (yet) and would also not record the `not abstract, not final` metric in that case, even though for similar code using `abstract` or `final`, the metric _would_ be recorded.
    
    This commit ensures the `not abstract, not final` metric will now be recorded either way.
    jrfnl committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    59bb205 View commit details
    Browse the repository at this point in the history
  3. Universal/RequireFinalClass: act on more cases

    As things were, the sniff would bow out if the opening brace for the class could not be found (yet).
    
    This commit changes the sniff to act in more cases, i.e. it does require for a (non-empty) token after the `class` keyword, but once that token is found, the sniff will act.
    
    Includes minor changes to how the message text is build up to prevent weird code snippets being show in the message.
    
    Includes additional test.
    jrfnl committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    8bf00e3 View commit details
    Browse the repository at this point in the history