Exclude certain file types from "Perform code analysis" on check in.
已回答
I really like the check box on the commit dialog, "Perform code analysis."
However, I wish I could tell it to ignore certain file types. For example. my ant xml files are littered with spurious errors and so whenever I have an ant file included in the commit it makes a lot of noise that I'd rather not have.
It doesn't seem like there is any way to adjust the scope of the code analysis? Am I mistaken?
-g
请先登录再写评论。
Not for commits or general editing. Only when running inspection reports via Analyze > Inspect Code...
You can suppress all warnings (or for certain inspections) for a file (such as your ant file). But this of course prevents you from getting those warnings and errors highlighted during editing.
To suppress:
I know this is an old post, but several similar questions are routed to it. The problem is that the answer here is a non-answer. This is a very reasonable feature request. For example - when your code includes svg files that are not manually coded, because it's XML they get analyzed. You get resources that are not found or other non-issues with those files. Similar to the ant config examples mentioned elsewhere. In those cases you will never care about these specific files or even with the file type entirely, as in SVG files.
The request here was to be able to just exclude some files from analysis - not to deal with specific rules. I can see examples like:
I support the request as it will save us from a major annoyance. These files often result in huge numbers of errors and warnings that just contaminate the output as well as slow down the analysis (they can be large)
Hi,
It's definitely a reasonable request, please see: https://youtrack.jetbrains.com/issue/IJPL-156414/Add-option-to-exclude-specific-files-from-code-analysis-on-commit
Feel free to comment and vote.