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

ClassDataAbstractionCoupling and ClassFanOutComplexity: property to exclude packages #3309

Closed
romani opened this Issue Jun 25, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@romani
Member

romani commented Jun 25, 2016

Created: 2004-07-29
Creator: Paul
Private: No

Hi there,

http://checkstyle.sourceforge.net/config_metrics.html#ClassDataAbstractionCoupling

It would be nice to be able to exclude packages from
the Data Abstraction Coupling check. For example the
entire Java SDK packages could be excluded by
specifying java. and javax. to be excluded.

Cheers,
Paul.
Discussion

Gunter Blache
2004-08-09
I would like to support the request. Especially when writing
Swing GUI code, you easily surpass the default data
abstraction coupling and class fan out values, although
these values definately make a lot of sense for regular classes.
E.g. a regualar main window uses GUI components JFrame,
JPanel, JButton, JTextField, JMenuBar, JMenu, JMenuItem,
JFileChooser, event handling classes like ActionListener,
WindowListener, MouseListener, models like Document,
ButtonGroup, and the standard classes String, File etc. and
there is just no way around it ( except from breaking this
into multiple classes, but this usually does not make sense )

@romani romani added the approved label Jun 25, 2016

@rnveach rnveach added the easy label Mar 2, 2017

@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Mar 2, 2017

Contributor

I am on it

Contributor

soon commented Mar 2, 2017

I am on it

@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Mar 4, 2017

Contributor

@romani I'd like to discuss this issue. You said, that it is not very easy issue, but I don't see any problems with it.

All we need to do is to add another parameter like excludedClasses and use it in the isSignificant method. The simple check using startsWith should work pretty well. Trie (or similar) could also be used for large amount of excluded packages or input classes.

Is my approach right, or I missed something?

Contributor

soon commented Mar 4, 2017

@romani I'd like to discuss this issue. You said, that it is not very easy issue, but I don't see any problems with it.

All we need to do is to add another parameter like excludedClasses and use it in the isSignificant method. The simple check using startsWith should work pretty well. Trie (or similar) could also be used for large amount of excluded packages or input classes.

Is my approach right, or I missed something?

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Mar 5, 2017

Member

@soon ,
package names should be provided by user in form "java.util" (not "java.util." or "java.util.*").
Package name is identifier without any trailing symbols.

Member

romani commented Mar 5, 2017

@soon ,
package names should be provided by user in form "java.util" (not "java.util." or "java.util.*").
Package name is identifier without any trailing symbols.

soon added a commit to soon/checkstyle that referenced this issue Mar 5, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 5, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 5, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 5, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 5, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 6, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 8, 2017

@romani romani changed the title from ClassDataAbstractionCoupling: property to exclude packages to ClassDataAbstractionCoupling and ClassFanOutComplexity: property to exclude packages Mar 12, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Mar 12, 2017

Member

@soon ,
title of issue is changed, so it is ok to change both classes.

Member

romani commented Mar 12, 2017

@soon ,
title of issue is changed, so it is ok to change both classes.

soon added a commit to soon/checkstyle that referenced this issue Mar 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 19, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 19, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 19, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 21, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 23, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 23, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 23, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 27, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 27, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 27, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 27, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 27, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Mar 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Apr 9, 2017

soon added a commit to soon/checkstyle that referenced this issue Apr 9, 2017

soon added a commit to soon/checkstyle that referenced this issue Apr 10, 2017

romani added a commit that referenced this issue Apr 10, 2017

@romani romani added the medium label Apr 10, 2017

@romani romani added new feature and removed easy labels Apr 10, 2017

@romani romani added this to the 7.7 milestone Apr 10, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Apr 10, 2017

Member

Fix is merged

Member

romani commented Apr 10, 2017

Fix is merged

@romani romani closed this Apr 10, 2017

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