You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RULES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ Some are applicable for different technologies.
69
69
| EC91 | Use `Where` before `OrderBy`| Filter elements before sorting them for improved efficiency || ❓ | ❓ | ❓ | ❓ | ❓ | ✅ | ❓ |
70
70
| EC92 | Use string.Length instead of comparison with empty string | Comparing a string to an empty string is unnecessary and can be replaced by a call to `string.Length` which is more performant and more readable. || 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ✅ | 🚫 |
71
71
| EC93 | Return `Task` directly | Consider returning a `Task` directly instead of a single `await`|| ❓ | ❓ | ❓ | ❓ | ❓ | ✅ | ❓ |
72
-
| EC94 | Use orElseGet instead of orElse | Parameter of orElse() is evaluated, even when having a non-empty Optional. Supplier method of orElseGet passed as an argument is only executed when an Optional value isn’t present. Therefore, using orElseGet() will save computing time. |[cnumr best practices (3rd edition) BP_042](https://github.com/cnumr/best-practices/blob/main/chapters/BP_042_fr.md)| 🚧 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ |
72
+
| EC94 | Use orElseGet instead of orElse | Parameter of orElse() is evaluated, even when having a non-empty Optional. Supplier method of orElseGet passed as an argument is only executed when an Optional value isn’t present. Therefore, using orElseGet() will save computing time. |[Optimized use of Java Optional Else](https://github.com/green-code-initiative/ecoCode-challenge/issues/77)| 🚧 | ❓ | ❓ | ❓ | ❓ | ❓ | ❓ |
73
73
| EC203 | Detect unoptimized file formats | When it is possible, to use svg format image over other image format || 🚀 | 🚀 | 🚀 | ✅ | 🚀 | 🚀 | 🚫 |
74
74
| EC404 | Avoid list comprehension in iterations | Use generator comprehension instead of list comprehension in for loop declaration || 🚫 | 🚫 | 🚫 | ✅ | 🚫 | 🚫 | 🚫 |
75
75
|| Use official social media sharing buttons | These JavaScript plugins are very resource-intensive: to work, they require a large number of requests and download heavy files. It is better to prefer direct links. |[cnumr best practices (3rd edition) BP_019](https://github.com/cnumr/best-practices/blob/main/chapters/BP_019_fr.md)| 🚫 | 🚫 | 🚀 | 🚫 | 🚫 | 🚫 | 🚀 |
0 commit comments