Skip to content

Commit

Permalink
[NO-JIRA] Update rules metadata (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian-burihabwa-sonarsource authored Sep 16, 2024
1 parent 9c9c2d5 commit 41ac83c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
{
"key": "com.sksamuel.scapegoat.inspections.controlflow.WhileTrue",
"name": "Checks for code that uses a `while(true)` or `do { } while(true)` block.",
"description": "Checks for code that uses a `while(true)` or `do { } while(true)` block. \u003cbr/\u003e\n*Rationale*: This type of code is usually not meant for production as it will not return normally. If you need to loop until interrupted, then consider using a flag. \u003cbr/\u003e\n### Suppressing Warnings by Method or Class \u003cbr/\u003e\nYou can suppress a specific warning by method or by class using the java.lang.SuppressWarnings annotation. \u003cbr/\u003e\nUse the simple name of the inspection to be ignored as the argument, or use \u0026quot;all\u0026quot; to suppress all scapegoat warnings in the specified scope. \u003cbr/\u003e\nSome examples: \u003cbr/\u003e\n```scala \u003cbr/\u003e\n@SuppressWarnings(Array(\u0026quot;all\u0026quot;)) \u003cbr/\u003e\nclass Test { \u003cbr/\u003e\n def hello: Unit \u003d { \u003cbr/\u003e\n val s: Any \u003d \u0026quot;sammy\u0026quot; \u003cbr/\u003e\n println(s.asInstanceOf[String]) \u003cbr/\u003e\n } \u003cbr/\u003e\n} \u003cbr/\u003e\nclass Test2 { \u003cbr/\u003e\n @SuppressWarnings(Array(\u0026quot;AsInstanceOf\u0026quot;)) \u003cbr/\u003e\n def hello: Unit \u003d { \u003cbr/\u003e\n val s: Any \u003d \u0026quot;sammy\u0026quot; \u003cbr/\u003e\n println(s.asInstanceOf[String]) \u003cbr/\u003e\n } \u003cbr/\u003e\n} \u003cbr/\u003e\n``` \u003cbr/\u003e\n## Other static analysis tools: \u003cbr/\u003e\n* ScalaStyle (Scala) - https://github.com/scalastyle/scalastyle/wiki \u003cbr/\u003e\n* Linter (Scala) - https://github.com/HairyFotr/linter \u003cbr/\u003e\n* WartRemover (Scala) - https://github.com/puffnfresh/wartremover \u003cbr/\u003e\n* Findbugs (JVM) - http://findbugs.sourceforge.net/bugDescriptions.html \u003cbr/\u003e\n* Fb-contrib (JVM) - http://fb-contrib.sourceforge.net/ \u003cbr/\u003e\n* CheckStyle (Java) - http://checkstyle.sourceforge.net/availablechecks.html \u003cbr/\u003e\n* PMD (Java) - http://pmd.sourceforge.net/pmd-5.0.3/rules/index.html \u003cbr/\u003e\n* Error-prone (Java) - https://github.com/google/error-prone \u003cbr/\u003e\n* CodeNarc (Groovy) - http://codenarc.sourceforge.net/codenarc-rule-index.html \u003cbr/\u003e\n* PVS-Studio (C++) - http://www.viva64.com/en/d/ \u003cbr/\u003e\n* Coverity (C++) - http://www.slideshare.net/Coverity/static-analysis-primer-22874326 (6,7) \u003cbr/\u003e\n* CppCheck (C++) - http://cppcheck.sourceforge.net/ \u003cbr/\u003e\n* OCLint (C++/ObjC) - http://docs.oclint.org/en/dev/rules/index.html \u003cbr/\u003e\n* JSHint (Javascript) - http://jshint.com/ \u003cbr/\u003e\n* JavascriptLint (Javascript) - http://www.javascriptlint.com/ \u003cbr/\u003e\n* ClosureLinter (Javascript) - https://developers.google.com/closure/utilities/ \u003cbr/\u003e\n",
"description": "Checks for code that uses a `while(true)` or `do { } while(true)` block. \u003cbr/\u003e\n*Rationale*: This type of code is usually not meant for production as it will not return normally. If you need to loop until interrupted, then consider using a flag. \u003cbr/\u003e\n",
"type": "CODE_SMELL",
"severity": "MAJOR",
"url": "https://github.com/sksamuel/scapegoat/blob/master/README.md#inspections"
Expand Down

0 comments on commit 41ac83c

Please sign in to comment.