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

Already on GitHub? Sign in to your account

Exclude some java.util classes from Class Fan out #31

Closed
vmassol opened this Issue Oct 27, 2013 · 3 comments

Comments

Projects
None yet
2 participants

vmassol commented Oct 27, 2013

The purpose of the ClassFanOutComplexityCheck is to ensure that classes don't get too complex and stay easy to maintain. Some classes are excluded from computation by default (like java.lang.*) because every java dev know about them and they don't increase the maintenance.

I'd like to propose to add the Java Collections too (Map, HashMap, List, ArrayList, etc) too since they're part of the language and every java dev know about them too (similar to the String class for example).

These classes are causing unnecessary class fan out violations on code.

Could you please consider excluding them?

See https://sourceforge.net/p/checkstyle/feature-requests/607/

The idea is to exclude the following which should be considered as part of the language now by all developers and thus shouldn't be counted as part of the class fan out:

        mIgnoredClassNames.add("Class");

        // java.util.*
        mIgnoredClassNames.add("Map");
        mIgnoredClassNames.add("List");
        mIgnoredClassNames.add("HashMap");
        mIgnoredClassNames.add("ArrayList");
        mIgnoredClassNames.add("Locale");

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

vmassol added a commit to vmassol/checkstyle that referenced this issue Oct 27, 2013

Owner

romani commented Oct 31, 2013

please squash all your commits in one, let it more code-reviewable

vmassol commented Nov 1, 2013

This is what I did and the exact reason you're seeing several references on this page... ;) Did you check the PR (#34)?

Owner

romani commented Nov 18, 2013

to future developer, please review code of @vmassol .

@romani romani closed this Dec 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment