Update for ForbidCertainImportsCheck #140

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

Projects

None yet

1 participant

@daniilyar
Member

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
Member

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

@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
ac4ab7a
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
e7c2e4a
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
56279c5
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 14, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
f3685b8
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
9cc3265
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
2933fa2
@daniilyar daniilyar pushed a commit to daniilyar/sevntu.checkstyle that referenced this issue Oct 24, 2013
Daniil Yaroslavtsev Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
903f199
@daniilyar daniilyar added a commit to daniilyar/sevntu.checkstyle that referenced this issue Nov 11, 2013
@daniilyar Daniil Yaroslavtsev + daniilyar Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
0b3ccc3
@daniilyar daniilyar added a commit to daniilyar/sevntu.checkstyle that referenced this issue Nov 11, 2013
@daniilyar Daniil Yaroslavtsev + daniilyar Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
2cb22b4
@romani romani pushed a commit that closed this issue Nov 12, 2013
@daniilyar Daniil Yaroslavtsev + daniilyar Fixes #140: Updated ForbidCertainImportsCheck to let user set exclude…
…s for forbidden imports
28caa48
@romani romani closed this in 28caa48 Nov 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment