-
Notifications
You must be signed in to change notification settings - Fork 84
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
How to use .cflintrc to ignore a directory? #290
Comments
Maybe you can suggest a better assumption, but currently the code assumes an empty include list is NOT a constraint. In other words, when both the include list and the exclude list are empty, ALL messages codes are enabled. To do what you want, simply put a meaningless match in the include list: "includes" : [ {} ], That will include only messages for which the code is null. i.e. none. See |
I was looking around in the wiki and past issues and couldn't find anything and you just needed to point out the correct wiki page. sigh :-) |
Now re the assumptions... I'm not sure I agree with them. I need to have a bit of a think over all the possible scenarios and form a more meaningful opinion for myself. |
So, I tried the notation you pointed me to, but it doesn't seem to work. This is my .cflintrc in /Users/kai/Documents/Code/something/html/testbox
Am running: java -jar CFLint-1.1.0-all.jar -folder /Users/kai/Documents/Code/something/html/ -xml -xmlfile something.xml -xmlstyle findbugs -includeRule CFQUERYPARAM_REQ,QUERYPARAM_REQ,MISSING_VAR,AVOID_EMPTY_FILES -v -e -stats When it outputs, I still get a couple of these:
|
No problem. I just added the page mentioned tonight. Sorry for the confusion. I'd like to hear your thoughts on the empty include. Ah, MISSING_SEMI is special -- that does need to honor the include rules. Good catch. The other messages should filter out though. |
Is making MISSING_SEMI stick to the .cflintrc rules easy? Or a major hassle? |
Not too big a deal.
If CFLint:1225 was changed from bugs.add() to use the reportRule()
method like PLUGIN_ERROR does on line 481, we would probably be good.
You'd just need to construct a Context object to pass to it.
…On Mon, Jun 19, 2017 at 11:00 PM, Kai Koenig ***@***.***> wrote:
Is making MISSING_SEMI stick to the .cflintrc rules easy? Or a major
hassle?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#290 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFtZu34bF3OGceaFW7mQSdZP9_u2cYewks5sFzXNgaJpZM4NyQ0u>
.
|
ok, I'll have a play with that later and see how I go. |
I tried a few things - my last effort being:
But that (and any previous variations I tried) result in null pointer exceptions and failed test on mvn install. I'm not sure if the Context is constructed right - it also required plugin or pluginParams - which I have no idea what that is and where to get it from in that function :) |
See 20b3622 |
…xposed and output if a directory is supposed to be ignored.
MISSING_SEMI is fixed and working. However, just noticed I'm getting PARSE_ERRORs for ignored directories too. I've tried to build a solution for it following your model for MISSING_SEMI, @ryaneberly - but it doesn't seem to work. Pushed and PRed it in 290-ParseError branch - could you have a look at it re what I'm missing? PR is in #319 |
@TheRealAgentK , |
New PR in #321 |
merged |
I'm running CFLint against a codebase and want to exclude some directory structures from being scanned.
Let's say I'm scanning against /a and the full structure is /a/b/c/d
So, I put a .cflintrc into /a/b/c with this content:
expecting to not get any of the overall rules of the CFLint execution in a/b/c and a/b/c/d because I switched off inheriting. Excluding/Including is not specified either - so I'd think that nothing should run here.
Nevertheless, I still get MISSING_SEMIs and others in those directories.
The text was updated successfully, but these errors were encountered: