Is there a way to ignore a single FindBugs warning?

The FindBugs initial approach involves XML configuration files aka filters. This is really less convenient than the PMD solution but FindBugs works on bytecode, not on the source code, so comments are obviously not an option. Example: <Match> <Class name=”com.mycompany.Foo” /> <Method name=”bar” /> <Bug pattern=”DLS_DEAD_STORE_OF_CLASS_LITERAL” /> </Match> However, to solve this issue, FindBugs later … Read more

Disable messages upon loading a package

Just use suppressMessages() around your library() call: edd@max:~$ R R version 2.14.1 (2011-12-22) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) […] R> suppressMessages(library(ROCR)) R> # silently loaded R> search() [1] “.GlobalEnv” “package:ROCR” # it’s really there [3] “package:gplots” “package:KernSmooth” [5] “package:grid” “package:caTools” [7] “package:bitops” “package:gdata” [9] “package:gtools” “package:stats” … Read more

Is there a way to suppress warnings in Xcode?

To disable warnings on a per-file basis, using Xcode 3 and llvm-gcc-4.2 you can use: #pragma GCC diagnostic ignored “-Wwarning-flag” Where warning name is some gcc warning flag. This overrides any warning flags on the command line. It doesn’t work with all warnings though. Add -fdiagnostics-show-option to your CFLAGS and you can see which flag … Read more

Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

You can disable any Python warnings via the PYTHONWARNINGS environment variable. In this case, you want: export PYTHONWARNINGS=”ignore:Unverified HTTPS request” To disable using Python code (requests >= 2.16.0): import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) For requests < 2.16.0, see original answer below. Original answer The reason doing urllib3.disable_warnings() didn’t work for you is because it looks like you’re … Read more

What is the list of valid @SuppressWarnings warning names in Java?

It depends on your IDE or compiler. Here is a list for Eclipse Galileo: all to suppress all warnings boxing to suppress warnings relative to boxing/unboxing operations cast to suppress warnings relative to cast operations dep-ann to suppress warnings relative to deprecated annotation deprecation to suppress warnings relative to deprecation fallthrough to suppress warnings relative … Read more