Skip to content

Commit

Permalink
Make VersionHelper ignore the ^ before the version number (#299)
Browse files Browse the repository at this point in the history
Co-authored-by: Hélio Rocha <hjrocha@gmail.com>
  • Loading branch information
heliocodacy and hjrocha authored Jul 9, 2024
1 parent d73720c commit 2115421
Showing 7 changed files with 22 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ To add a new plugin to Codesniffer:
2. Add to `src/main/scala/codacy/codesniffer/docsgen/VersionsHelper.scala` the plugin version:

```scala
lazy val newPlugin = properties("pluginNamespace/pluginName").str
lazy val newPlugin = properties("pluginNamespace/pluginName").str.replace("^","")
```

3. Implement the plugin documentation parser inside `src/main/scala/codacy/codesniffer/docsgen/parsers`. The parser must extend `DocsParser` and override the following:
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -10,16 +10,16 @@ object VersionsHelper {
composerJson("require")
}

lazy val vipWordpress = properties("automattic/vipwpcs").str
lazy val cakephp = properties("cakephp/cakephp-codesniffer").str
lazy val doctrine = properties("doctrine/coding-standard").str
lazy val drupalCoder = properties("drupal/coder").str
lazy val symfony = properties("escapestudios/symfony2-coding-standard").str
lazy val magentoCS = properties("magento/magento-coding-standard").str
lazy val magentoEQP = properties("magento/marketplace-eqp").str
lazy val phpCompatibility = properties("phpcompatibility/php-compatibility").str
lazy val phpcsSecurityAudit = properties("pheromone/phpcs-security-audit").str
lazy val slevomatCS = properties("slevomat/coding-standard").str
lazy val codesniffer = properties("squizlabs/php_codesniffer").str
lazy val wordpress = properties("wp-coding-standards/wpcs").str
lazy val vipWordpress = properties("automattic/vipwpcs").str.replace("^","")
lazy val cakephp = properties("cakephp/cakephp-codesniffer").str.replace("^","")
lazy val doctrine = properties("doctrine/coding-standard").str.replace("^","")
lazy val drupalCoder = properties("drupal/coder").str.replace("^","")
lazy val symfony = properties("escapestudios/symfony2-coding-standard").str.replace("^","")
lazy val magentoCS = properties("magento/magento-coding-standard").str.replace("^","")
lazy val magentoEQP = properties("magento/marketplace-eqp").str.replace("^","")
lazy val phpCompatibility = properties("phpcompatibility/php-compatibility").str.replace("^","")
lazy val phpcsSecurityAudit = properties("pheromone/phpcs-security-audit").str.replace("^","")
lazy val slevomatCS = properties("slevomat/coding-standard").str.replace("^","")
lazy val codesniffer = properties("squizlabs/php_codesniffer").str.replace("^","")
lazy val wordpress = properties("wp-coding-standards/wpcs").str.replace("^","")
}
1 change: 1 addition & 0 deletions docs/description/Security_CVE_20132110.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Security CVE related issue: 20132110
1 change: 1 addition & 0 deletions docs/description/Security_CVE_20134113.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Security CVE related issue: 20134113
12 changes: 4 additions & 8 deletions docs/description/description.json
Original file line number Diff line number Diff line change
@@ -2278,12 +2278,12 @@
"title" : "Security Bad Functions related issue: System Exec Functions",
"parameters" : [ ]
}, {
"patternId" : "Security_CVE_CVE20132110",
"title" : "Security CVE related issue: CVE20132110",
"patternId" : "Security_CVE_20132110",
"title" : "Security CVE related issue: 20132110",
"parameters" : [ ]
}, {
"patternId" : "Security_CVE_CVE20134113",
"title" : "Security CVE related issue: CVE20134113",
"patternId" : "Security_CVE_20134113",
"title" : "Security CVE related issue: 20134113",
"parameters" : [ ]
}, {
"patternId" : "Security_Drupal7_AESModule",
@@ -2350,10 +2350,6 @@
"patternId" : "Security_Misc_IncludeMismatch",
"title" : "Security Misc related issue: Include Mismatch",
"parameters" : [ ]
}, {
"patternId" : "Security_Misc_TypeJuggle",
"title" : "Security Misc related issue: Type Juggle",
"parameters" : [ ]
}, {
"patternId" : "SlevomatCodingStandard_Arrays_AlphabeticallySortedByKeys",
"title" : "Arrays: Alphabetically Sorted By Keys",
11 changes: 2 additions & 9 deletions docs/patterns.json
Original file line number Diff line number Diff line change
@@ -3648,14 +3648,14 @@
"languages" : [ ],
"enabled" : false
}, {
"patternId" : "Security_CVE_CVE20132110",
"patternId" : "Security_CVE_20132110",
"level" : "Warning",
"category" : "Security",
"parameters" : [ ],
"languages" : [ ],
"enabled" : false
}, {
"patternId" : "Security_CVE_CVE20134113",
"patternId" : "Security_CVE_20134113",
"level" : "Warning",
"category" : "Security",
"parameters" : [ ],
@@ -3772,13 +3772,6 @@
"parameters" : [ ],
"languages" : [ ],
"enabled" : false
}, {
"patternId" : "Security_Misc_TypeJuggle",
"level" : "Warning",
"category" : "Security",
"parameters" : [ ],
"languages" : [ ],
"enabled" : false
}, {
"patternId" : "SlevomatCodingStandard_Arrays_AlphabeticallySortedByKeys",
"level" : "Info",

0 comments on commit 2115421

Please sign in to comment.