Questions tagged [suppressmessage]
39 questions
18
votes
3 answers
Suppress All Messages/Warnings with Readr read_csv function
I am creating a rmarkdown pdf report. I used read_csv function from readr package to import some csv files in a folder. I used SuppressMessages/Warnings functions to hide all warnings/messages, but I still get the messages as below when trying to…

Felix Zhao
- 459
- 5
- 9
13
votes
4 answers
Suppress install outputs in R
This is really starting to bug me...I have tried a few methods and none seem to work
I am running an install from a function which generates a lot of unnecessary messages that I would like to suppress, but all of the methods I tried to do this have…

h.l.m
- 13,015
- 22
- 82
- 169
11
votes
3 answers
StyleCop/FxCop 10 - How do you properly suppress a message only on a namespace level?
FxCop 10 is complaining about the following:
using XYZ.Blah; //CA1709 - "XYZ"
using Xyz.Blah; //No complaint.
using XylophoneSuperDuperLongFullName.Blah; //I don't want to have a long full name for my company name.
The problem is... I want my…

michael
- 14,844
- 28
- 89
- 177
11
votes
1 answer
Get FxCop to suppress warnings for a whole type?
How can I suppress FxCop warnings for a whole type?
namespace ConsoleApplication1
{
public static class Serializer
{
public static string Serialize(T obj)
{
return string.Empty;
}
public…

shatl
- 911
- 16
- 21
8
votes
3 answers
How do I suppress App Engine logging while running unit tests?
I'm using gaetestbed in my GAE app, and it's working very well. However, the useful statements that nose prints when your test is incorrect is being washed away by App Engine's logging:
root: Level 9: Evaling filter expression…

Matt Norris
- 8,596
- 14
- 59
- 90
5
votes
3 answers
Can I use SuppressMessage on a framework method?
I would like to implement the following suggestion from CodeContracts:
CodeContracts: MyModule: Method MyModule.MyClass.MyMethod:
To mask *all* warnings issued like the precondition add the attribute:
[SuppressMessage("Microsoft.Contracts",…

Dave Neeley
- 3,526
- 1
- 24
- 42
5
votes
2 answers
VS2010 code analysis. Suppress message CA1051:DoNotDeclareVisibleInstanceFields for all class members
I have a class like this one:
public class Foo
{
public readonly int A = 1;
public readonly int B = 2;
}
When I run VS2010 built in Code Analysis tool, I get 2 identical warnings:
that 'field '...' is visible outside of its declaring type,…

feorex
- 53
- 1
- 4
5
votes
1 answer
Handle RSelenium error messages
Currently scraping a page which can have a variable amount of elements and also sometimes formats the same data elements with different selectors. Currently trying to ignore errors thrown by RSelenium with some tryCatch code but still stops when the…

tonyk
- 348
- 5
- 22
5
votes
2 answers
Suppress displaying content of variables in F# interactive
Possible Duplicate:
F# - Keep F# interactive from posting output
Is there any way how to suppress displaying content of variables in F# interactive?
Why do I want it? This is what is printed out just for one call in F# interactive. To find any…

Oldrich Svec
- 4,191
- 2
- 28
- 54
4
votes
2 answers
suppressMessages with a return instead of a print in R?
I have a package that has a bunch of functions that generate ggplot2 objects. Recently, ggplot2 added an update that gives a message that says:
`geom_smooth()` using method = 'loess' and formula 'y ~ x'
I know why ggplot2 is saying that, but I…

dfife
- 348
- 1
- 12
4
votes
1 answer
Can't access SuppressMessage attribute at runtime
I am trying to create a unit test that will only fail for types which don't suppress the corresponding message. However, I am unable to access the SuppressMessage attributes on any of my types in my unit tests. Is it possible to access…

Steven Wexler
- 16,589
- 8
- 53
- 80
3
votes
1 answer
StyleCop SP0100 error for Application_Start in Global.asax
Style cop will try to force you to take the underscore out of Application_Start in the Global.asax file in an mvc web application:
SP0100: Method (general) name Application_Start doesn't conform the
specified style: SampleName.
But this name…

DevDave
- 6,700
- 12
- 65
- 99
3
votes
0 answers
How to use suppressMessages() inside map()
I made a function my_fun() which generates messages with the message() function. And also uses pb$tick() to track progress with progress::progress_bar.
I am running this function inside a purrr::map() call to iterate over a long list like:…

Bibe
- 41
- 5
3
votes
0 answers
How do I add a SuppressMessage for type GlobalSuppression?
In my GlobalSuppression.cs I often end up with long justifications. I want those to span multiple lines, but don't want to gloabally suppress SA1118. Ideally it would be something like this:
[module: SuppressMessage(
"Microsoft.Design",
…

Lucas
- 14,227
- 9
- 74
- 124
3
votes
2 answers
PostgreSQL - How to suppress query statement message
I use a file where I have all my SQL queries. I run the following command:
psql -U postgres -d rails_development -a -f ProjectApp/db/Query.sql
Output is as following:
SELECT * FROM "Users"
id | username | firstname | lastname | [...]
...
(27…

Rares Mardare
- 193
- 1
- 4
- 13