Skip to content

Commit

Permalink
autofix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbale-altoros committed Jul 1, 2024
1 parent 93b02f4 commit 6fc5b55
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conf/rulesets/solhint-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = Object.freeze({
immutablesAsConstants: true,
},
],
'import-order': 'warn',
'imports-order': 'warn',
'modifier-name-mixedcase': 'warn',
'named-parameters-mapping': 'warn',
'private-vars-leading-underscore': [
Expand Down
2 changes: 1 addition & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ title: "Rule Index of Solhint"
| [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 | | |
| [func-param-name-mixedcase](./rules/naming/func-param-name-mixedcase.md) | Function param name must be in mixedCase. | | |
| [immutable-vars-naming](./rules/naming/immutable-vars-naming.md) | Check Immutable variables. Capitalized SNAKE_CASE or mixedCase depending on configuration. | $~~~~~~~~$✔️ | |
| [import-order](./rules/naming/import-order.md) | Order the imports of the contract to follow a certain hierarchy | | |
| [imports-order](./rules/naming/imports-order.md) | Order the imports of the contract to follow a certain hierarchy | | |
| [modifier-name-mixedcase](./rules/naming/modifier-name-mixedcase.md) | Modifier name must be in mixedCase. | | |
| [named-parameters-mapping](./rules/naming/named-parameters-mapping.md) | Solidity v0.8.18 introduced named parameters on the mappings definition. | | |
| [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 | | |
Expand Down
40 changes: 40 additions & 0 deletions docs/rules/naming/imports-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "imports-order | Solhint"
---

# imports-order
![Category Badge](https://img.shields.io/badge/-Style%20Guide%20Rules-informational)
![Default Severity Badge warn](https://img.shields.io/badge/Default%20Severity-warn-yellow)

## Description
Order the imports of the contract to follow a certain hierarchy

## Options
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn.

### Example Config
```json
{
"rules": {
"imports-order": "warn"
}
}
```

### Notes
- Order by hierarchy of directories first, e.g. ../../ comes before ../, which comes before ./, which comes before ./foo
- Order alphabetically for each file at the same level, e.g. ./bar comes before ./foo
- Rule support up to 10 folder levels "../../../../../../../../../../"

## Examples
This rule does not have examples.

## Version
This rule is introduced in the latest version.

## Resources
- [Rule source](https://github.com/protofire/solhint/tree/master/lib/rules/naming/imports-order.js)
- [Document source](https://github.com/protofire/solhint/tree/master/docs/rules/naming/imports-order.md)
- [Test cases](https://github.com/protofire/solhint/tree/master/test/rules/naming/imports-order.js)

0 comments on commit 6fc5b55

Please sign in to comment.