Skip to content

Commit

Permalink
More tests and reverting rspec change.
Browse files Browse the repository at this point in the history
  • Loading branch information
michalb-sonar committed Jun 20, 2017
1 parent e775934 commit 54ddb5a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@
<value>misra,cert</value>
</data>
<data name="S2201_Title" xml:space="preserve">
<value>Return values should not be ignored when function calls don't have any side effects</value>
<value>Return values from functions without side effects should not be ignored</value>
</data>
<data name="S2201_Type" xml:space="preserve">
<value>BUG</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ public void Method()
}

try { }
catch (Exception e) // Noncompliant
catch (Exception) // Noncompliant
{
new Exception();
}

try { }
catch (IOException)
{
new Exception();
}
Expand All @@ -71,6 +77,12 @@ public void Method()
// ^^^^^
{
}

try { }
catch (DummyType)
{
throw;
}
}
}
}

0 comments on commit 54ddb5a

Please sign in to comment.