Skip to content

Commit 2115421

Browse files
heliocodacyhjrocha
andauthored
Make VersionHelper ignore the ^ before the version number (#299)
Co-authored-by: Hélio Rocha <[email protected]>
1 parent d73720c commit 2115421

File tree

7 files changed

+22
-31
lines changed

7 files changed

+22
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To add a new plugin to Codesniffer:
5959
2. Add to `src/main/scala/codacy/codesniffer/docsgen/VersionsHelper.scala` the plugin version:
6060

6161
```scala
62-
lazy val newPlugin = properties("pluginNamespace/pluginName").str
62+
lazy val newPlugin = properties("pluginNamespace/pluginName").str.replace("^","")
6363
```
6464

6565
3. Implement the plugin documentation parser inside `src/main/scala/codacy/codesniffer/docsgen/parsers`. The parser must extend `DocsParser` and override the following:

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc-generator/src/main/scala/codacy/codesniffer/docsgen/VersionsHelper.scala

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ object VersionsHelper {
1010
composerJson("require")
1111
}
1212

13-
lazy val vipWordpress = properties("automattic/vipwpcs").str
14-
lazy val cakephp = properties("cakephp/cakephp-codesniffer").str
15-
lazy val doctrine = properties("doctrine/coding-standard").str
16-
lazy val drupalCoder = properties("drupal/coder").str
17-
lazy val symfony = properties("escapestudios/symfony2-coding-standard").str
18-
lazy val magentoCS = properties("magento/magento-coding-standard").str
19-
lazy val magentoEQP = properties("magento/marketplace-eqp").str
20-
lazy val phpCompatibility = properties("phpcompatibility/php-compatibility").str
21-
lazy val phpcsSecurityAudit = properties("pheromone/phpcs-security-audit").str
22-
lazy val slevomatCS = properties("slevomat/coding-standard").str
23-
lazy val codesniffer = properties("squizlabs/php_codesniffer").str
24-
lazy val wordpress = properties("wp-coding-standards/wpcs").str
13+
lazy val vipWordpress = properties("automattic/vipwpcs").str.replace("^","")
14+
lazy val cakephp = properties("cakephp/cakephp-codesniffer").str.replace("^","")
15+
lazy val doctrine = properties("doctrine/coding-standard").str.replace("^","")
16+
lazy val drupalCoder = properties("drupal/coder").str.replace("^","")
17+
lazy val symfony = properties("escapestudios/symfony2-coding-standard").str.replace("^","")
18+
lazy val magentoCS = properties("magento/magento-coding-standard").str.replace("^","")
19+
lazy val magentoEQP = properties("magento/marketplace-eqp").str.replace("^","")
20+
lazy val phpCompatibility = properties("phpcompatibility/php-compatibility").str.replace("^","")
21+
lazy val phpcsSecurityAudit = properties("pheromone/phpcs-security-audit").str.replace("^","")
22+
lazy val slevomatCS = properties("slevomat/coding-standard").str.replace("^","")
23+
lazy val codesniffer = properties("squizlabs/php_codesniffer").str.replace("^","")
24+
lazy val wordpress = properties("wp-coding-standards/wpcs").str.replace("^","")
2525
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Security CVE related issue: 20132110
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Security CVE related issue: 20134113

docs/description/description.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,12 +2278,12 @@
22782278
"title" : "Security Bad Functions related issue: System Exec Functions",
22792279
"parameters" : [ ]
22802280
}, {
2281-
"patternId" : "Security_CVE_CVE20132110",
2282-
"title" : "Security CVE related issue: CVE20132110",
2281+
"patternId" : "Security_CVE_20132110",
2282+
"title" : "Security CVE related issue: 20132110",
22832283
"parameters" : [ ]
22842284
}, {
2285-
"patternId" : "Security_CVE_CVE20134113",
2286-
"title" : "Security CVE related issue: CVE20134113",
2285+
"patternId" : "Security_CVE_20134113",
2286+
"title" : "Security CVE related issue: 20134113",
22872287
"parameters" : [ ]
22882288
}, {
22892289
"patternId" : "Security_Drupal7_AESModule",
@@ -2350,10 +2350,6 @@
23502350
"patternId" : "Security_Misc_IncludeMismatch",
23512351
"title" : "Security Misc related issue: Include Mismatch",
23522352
"parameters" : [ ]
2353-
}, {
2354-
"patternId" : "Security_Misc_TypeJuggle",
2355-
"title" : "Security Misc related issue: Type Juggle",
2356-
"parameters" : [ ]
23572353
}, {
23582354
"patternId" : "SlevomatCodingStandard_Arrays_AlphabeticallySortedByKeys",
23592355
"title" : "Arrays: Alphabetically Sorted By Keys",

docs/patterns.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3648,14 +3648,14 @@
36483648
"languages" : [ ],
36493649
"enabled" : false
36503650
}, {
3651-
"patternId" : "Security_CVE_CVE20132110",
3651+
"patternId" : "Security_CVE_20132110",
36523652
"level" : "Warning",
36533653
"category" : "Security",
36543654
"parameters" : [ ],
36553655
"languages" : [ ],
36563656
"enabled" : false
36573657
}, {
3658-
"patternId" : "Security_CVE_CVE20134113",
3658+
"patternId" : "Security_CVE_20134113",
36593659
"level" : "Warning",
36603660
"category" : "Security",
36613661
"parameters" : [ ],
@@ -3772,13 +3772,6 @@
37723772
"parameters" : [ ],
37733773
"languages" : [ ],
37743774
"enabled" : false
3775-
}, {
3776-
"patternId" : "Security_Misc_TypeJuggle",
3777-
"level" : "Warning",
3778-
"category" : "Security",
3779-
"parameters" : [ ],
3780-
"languages" : [ ],
3781-
"enabled" : false
37823775
}, {
37833776
"patternId" : "SlevomatCodingStandard_Arrays_AlphabeticallySortedByKeys",
37843777
"level" : "Info",

0 commit comments

Comments
 (0)