Skip to content

Commit

Permalink
[PR 128-ecocode] replace EC34 by EC35 : update CHANGELOG, update rule…
Browse files Browse the repository at this point in the history
… specifications
  • Loading branch information
dedece35 committed Oct 21, 2023
1 parent 16d1c90 commit 745f6ad
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 47 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#136](https://github.com/green-code-initiative/ecoCode/issues/136) Upgrade rule EC53 for Python : no implementation possible for python

### Deleted
- [#128](https://github.com/green-code-initiative/ecoCode/pull/128) Delete rule EC34 for Python and PHP : rule replaced by EC35 ("file not found" sepcific)

## [1.4.0] - 2023-08-08

Expand Down
86 changes: 43 additions & 43 deletions RULES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ecocode-rules-specifications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
ASCIIDOC format is used with custom features such as :
- syntax highlighting (see code blocks on ASCIIDOC rules)
- inclusions (see: php/EC74.asciidoc)
- table data generation from CSV (see: php/EC34.asciidoc)
- table data generation from CSV (see: php/EC35.asciidoc)
-->
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Avoid using try-catch statement",
"title": "Avoid using try-catch statement with file open operation in try block",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Inside complex code parts (for exemple multiple loops, complex data constructions...), avoid using try...catch...finally.
Inside complex code parts (for exemple multiple loops, complex data constructions...), avoid using try...catch.
For the moment, this rule only deals with "file open" use case in try...catch blocks.

When an exception is thrown, a variable (the exception itself) is created in a catch block and it's destruction consumes unnecessary CPU cycles and RAM. Prefer using logical tests in this cases.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Inside complex code parts (for example multiple loops, complex data constructions...), avoid using try...catch...finally.
Inside complex code parts (for example multiple loops, complex data constructions...), avoid using try...catch.
For the moment, this rule only deals with "file open" use case in try...catch blocks.

When an exception is thrown, a variable (the exception itself) is created in a catch block, and it's destruction consumes unnecessary CPU cycles and RAM. Prefer using logical tests in this cases.

Expand Down

0 comments on commit 745f6ad

Please sign in to comment.