You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2021/05/08 21:32:00 UTC

[jira] [Closed] (MSHARED-990) Swap scope and exclude scope to access modifier in the check JavadocMethodCheck.

     [ https://issues.apache.org/jira/browse/MSHARED-990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylwester Lachiewicz closed MSHARED-990.
----------------------------------------
    Resolution: Fixed

> Swap scope and exclude scope to access modifier in the check JavadocMethodCheck.
> --------------------------------------------------------------------------------
>
>                 Key: MSHARED-990
>                 URL: https://issues.apache.org/jira/browse/MSHARED-990
>             Project: Maven Shared Components
>          Issue Type: Dependency upgrade
>          Components: maven-shared-resources
>            Reporter: Sylwester Lachiewicz
>            Priority: Major
>             Fix For: maven-shared-resources-4
>
>
> In Checkstyle 8.42 scope property for JavadocMethod and MissingJavadocMethod modules was replaced with accessModifiers (see [checkstyle/checkstyle#7417|https://github.com/checkstyle/checkstyle/issues/7417]).
> Migration Notes:
> Property excludeScope was dropped and scope property was from
> https://checkstyle.org/property_types.html#scope to accessModifiers of type https://checkstyle.org/property_types.html#access_modifiers .
> The change to accessModifiers basically combines scope and excludeScope into 1 field and allows you specify the exact modifiers you want to validate methods with. Scope ambiguously only let you choose 1 specific modifier, and any other modifers above it in our type documentation were included, regardless if you wanted to include them or not. With accessModifiers you can now write out any and all modifiers you wish to cover, with no ambiguity.
> Examples:
> scope => accessModifiers
> private => private, package, protected, and public
> package => package, protected, and public
> protected => protected, and public
> public => public
> excludeScope only allowed you to remove that 1 specific modifier. So scope of private and excludeScope of package included the modifiers private, protected, and public. With access modifiers you can have the same config with:
> <module name="JavadocMethod">
>   <property name="accessModifiers" value="private, protected, public"/>
> </module>
> Scope did support anonymous inner classes. Since that is technically not a modifier, it is no longer supported and there is workaround.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)