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

Update for ForbidCertainImportsCheck #140

Closed
daniilyar opened this Issue Sep 24, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@daniilyar
Member

daniilyar commented Sep 24, 2013

Currently we are using this check with params as below:

mPackageNamesRegexp=".+.ui..+"
mForbiddenImportsRegexp=".+.dao..+"

But we have a false-positive on code:

package com.xxx.ui.rules;
...
import org.springframework.dao.InvalidDataAccessResourceUsageException;

Checks says that 'Import .+dao.+ is not allowed here' but this is a valid case.

Sure, check regexp can be updated to skip such cases (something like "((?!springframework).+.dao..+)" ), but if there will be many such cases, regexp will be completely unreadable. So, we should find a way to ignore such cases in another way by updating the check`s code.

@daniilyar

This comment has been minimized.

Show comment
Hide comment
@daniilyar

daniilyar Oct 11, 2013

Member

We need this fix as soon as possible as we have many false-positives in our production code

Member

daniilyar commented Oct 11, 2013

We need this fix as soon as possible as we have many false-positives in our production code

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013

Daniil Yaroslavtsev
Fixes sevntu-checkstyle#140: Updated ForbidCertainImportsCheck to let…
… user set excludes for forbidden imports

daniilyar added a commit to daniilyar/sevntu.checkstyle that referenced this issue Nov 11, 2013

daniilyar added a commit to daniilyar/sevntu.checkstyle that referenced this issue Nov 11, 2013

@romani romani closed this in 28caa48 Nov 12, 2013

romani added a commit that referenced this issue Nov 12, 2013

Merge pull request #154 from daniilyar/master
Fixes #140: Updated ForbidCertainImportsCheck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment