Skip to content

Commit 0a34c4d

Browse files
Merge pull request #628 from protofire/develop
Merge Develop to Master v5.0.5
2 parents 0c05a45 + bea42ef commit 0a34c4d

File tree

70 files changed

+822
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+822
-89
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## [5.0.5] - 2025-01-16
2+
### Fixed
3+
- `gas-custom-errors` [#620](https://github.com/protofire/solhint/pull/620) - Support for Custom Errors inside `require` statements
4+
- `compiler-version` [#621](https://github.com/protofire/solhint/pull/621) - Upgraded minimum requirement for the rule
5+
- `reentrancy` [#622](https://github.com/protofire/solhint/pull/622) - Fixed path and typos
6+
- Typos [#623](https://github.com/protofire/solhint/pull/623) - Fixed typos
7+
- Typo [#625](https://github.com/protofire/solhint/pull/625) - Fixed typo
8+
9+
10+
### Added
11+
- New Rule: Duplicated Imports [#626](https://github.com/protofire/solhint/pull/626)
12+
- Cute Message on console report to gather community into discord channel
13+
14+
<br><br>
15+
16+
117
## [5.0.4] - 2024-12-31
218
### Fixed
319
- `imports-order` [#595](https://github.com/protofire/solhint/pull/595) - Replaced single quotes with double quotes

conf/rulesets/solhint-all.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module.exports = Object.freeze({
3636
'gas-strict-inequalities': 'warn',
3737
'gas-struct-packing': 'warn',
3838
'comprehensive-interface': 'warn',
39+
'duplicated-imports': 'warn',
3940
quotes: ['error', 'double'],
4041
'const-name-snakecase': 'warn',
4142
'contract-name-capwords': 'warn',
@@ -50,7 +51,6 @@ module.exports = Object.freeze({
5051
immutablesAsConstants: true,
5152
},
5253
],
53-
'imports-order': 'warn',
5454
'modifier-name-mixedcase': 'warn',
5555
'named-parameters-mapping': 'warn',
5656
'private-vars-leading-underscore': [
@@ -62,6 +62,7 @@ module.exports = Object.freeze({
6262
'use-forbidden-name': 'warn',
6363
'var-name-mixedcase': 'warn',
6464
'imports-on-top': 'warn',
65+
'imports-order': 'warn',
6566
ordering: 'warn',
6667
'visibility-modifier-order': 'warn',
6768
'avoid-call-value': 'warn',
@@ -71,7 +72,7 @@ module.exports = Object.freeze({
7172
'avoid-throw': 'warn',
7273
'avoid-tx-origin': 'warn',
7374
'check-send-result': 'warn',
74-
'compiler-version': ['error', '^0.8.0'],
75+
'compiler-version': ['error', '^0.8.24'],
7576
'func-visibility': [
7677
'warn',
7778
{

conf/rulesets/solhint-recommended.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module.exports = Object.freeze({
4343
'avoid-throw': 'warn',
4444
'avoid-tx-origin': 'warn',
4545
'check-send-result': 'warn',
46-
'compiler-version': ['error', '^0.8.0'],
46+
'compiler-version': ['error', '^0.8.24'],
4747
'func-visibility': [
4848
'warn',
4949
{

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:20-alpine
22
LABEL maintainer="diego.bale@protofire.io"
3-
ENV VERSION=5.0.4
3+
ENV VERSION=5.0.5
44

55
RUN npm install -g solhint@"$VERSION"

docs/rules.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ title: "Rule Index of Solhint"
2828
| Rule Id | Error | Recommended | Deprecated |
2929
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ------------ | ----------- |
3030
| [interface-starts-with-i](./rules/naming/interface-starts-with-i.md) | Solidity Interfaces names should start with an `I` | | |
31+
| [duplicated-imports](./rules/miscellaneous/duplicated-imports.md) | Check if an import is done twice in the same file and there is no alias | | |
3132
| [const-name-snakecase](./rules/naming/const-name-snakecase.md) | Constant name must be in capitalized SNAKE_CASE. (Does not check IMMUTABLES, use immutable-vars-naming) | $~~~~~~~~$✔️ | |
3233
| [contract-name-capwords](./rules/naming/contract-name-capwords.md) | Contract, Structs and Enums should be in CapWords. | $~~~~~~~~$✔️ | |
3334
| [event-name-capwords](./rules/naming/event-name-capwords.md) | Event name must be in CapWords. | $~~~~~~~~$✔️ | |
@@ -36,14 +37,14 @@ title: "Rule Index of Solhint"
3637
| [func-named-parameters](./rules/naming/func-named-parameters.md) | Enforce named parameters for function calls with 4 or more arguments. This rule may have some false positives | | |
3738
| [func-param-name-mixedcase](./rules/naming/func-param-name-mixedcase.md) | Function param name must be in mixedCase. | | |
3839
| [immutable-vars-naming](./rules/naming/immutable-vars-naming.md) | Check Immutable variables. Capitalized SNAKE_CASE or mixedCase depending on configuration. | $~~~~~~~~$✔️ | |
39-
| [imports-order](./rules/naming/imports-order.md) | Order the imports of the contract to follow a certain hierarchy (read "Notes section") | | |
4040
| [modifier-name-mixedcase](./rules/naming/modifier-name-mixedcase.md) | Modifier name must be in mixedCase. | | |
4141
| [named-parameters-mapping](./rules/naming/named-parameters-mapping.md) | Solidity v0.8.18 introduced named parameters on the mappings definition. | | |
4242
| [private-vars-leading-underscore](./rules/naming/private-vars-leading-underscore.md) | Non-external functions and state variables should start with a single underscore. Others, shouldn't | | |
4343
| [use-forbidden-name](./rules/naming/use-forbidden-name.md) | Avoid to use letters 'I', 'l', 'O' as identifiers. | $~~~~~~~~$✔️ | |
4444
| [var-name-mixedcase](./rules/naming/var-name-mixedcase.md) | Variable names must be in mixedCase. (Does not check IMMUTABLES, use immutable-vars-naming) | $~~~~~~~~$✔️ | |
4545
| [func-order](./rules/order/func-order.md) | Function order is incorrect. | | $~~~~~~~$✔️ |
4646
| [imports-on-top](./rules/order/imports-on-top.md) | Import statements must be on top. | $~~~~~~~~$✔️ | |
47+
| [imports-order](./rules/naming/imports-order.md) | Order the imports of the contract to follow a certain hierarchy (read "Notes section") | | |
4748
| [ordering](./rules/order/ordering.md) | Check order of elements in file and inside each contract, according to the style guide. | | |
4849
| [visibility-modifier-order](./rules/order/visibility-modifier-order.md) | Visibility modifier must be first in list of modifiers. | $~~~~~~~~$✔️ | |
4950

docs/rules/best-practices/code-complexity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ while (d > e) { }
6767
```
6868

6969
## Version
70-
This rule is introduced in the latest version.
70+
This rule was introduced in [Solhint 5.0.4](https://github.com/protofire/solhint/blob/v5.0.4)
7171

7272
## Resources
7373
- [Rule source](https://github.com/protofire/solhint/blob/master/lib/rules/best-practices/code-complexity.js)

docs/rules/best-practices/explicit-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ uint public variableName = uint256(5)
7777
```
7878

7979
## Version
80-
This rule is introduced in the latest version.
80+
This rule was introduced in [Solhint 5.0.4](https://github.com/protofire/solhint/blob/v5.0.4)
8181

8282
## Resources
8383
- [Rule source](https://github.com/protofire/solhint/blob/master/lib/rules/best-practices/explicit-types.js)

docs/rules/best-practices/function-max-lines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This rule accepts an array of options:
3434
This rule does not have examples.
3535

3636
## Version
37-
This rule is introduced in the latest version.
37+
This rule was introduced in [Solhint 5.0.4](https://github.com/protofire/solhint/blob/v5.0.4)
3838

3939
## Resources
4040
- [Rule source](https://github.com/protofire/solhint/blob/master/lib/rules/best-practices/function-max-lines.js)

docs/rules/best-practices/max-line-length.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This rule accepts an array of options:
3636
This rule does not have examples.
3737

3838
## Version
39-
This rule is introduced in the latest version.
39+
This rule was introduced in [Solhint 5.0.4](https://github.com/protofire/solhint/blob/v5.0.4)
4040

4141
## Resources
4242
- [Rule source](https://github.com/protofire/solhint/blob/master/lib/rules/best-practices/max-line-length.js)

docs/rules/best-practices/max-states-count.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This rule accepts an array of options:
9999
```
100100

101101
## Version
102-
This rule is introduced in the latest version.
102+
This rule was introduced in [Solhint 5.0.4](https://github.com/protofire/solhint/blob/v5.0.4)
103103

104104
## Resources
105105
- [Rule source](https://github.com/protofire/solhint/blob/master/lib/rules/best-practices/max-states-count.js)

0 commit comments

Comments
 (0)