Skip to content

Commit 233e423

Browse files
Merge pull request #670 from protofire/develop
Merge Develop to Master v5.1.0
2 parents 59d087b + 4dd8089 commit 233e423

File tree

195 files changed

+3306
-8826
lines changed

Some content is hidden

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

195 files changed

+3306
-8826
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
coverage
22
node_modules
3-
scripts
43
e2e
54
/_temp

.github/workflows/DOCKER.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121

2222
- name: Login to Docker Hub
2323
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_ACCESS_TOKEN }}

.github/workflows/E2E.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
node: [16, 18, 20]
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- uses: actions/setup-node@v3
2222
with:
2323
node-version: ${{ matrix.node }}
@@ -42,7 +42,7 @@ jobs:
4242
run: solhint --version
4343

4444
- name: Run E2E Tests
45-
run: cd e2e && npm install && npm test
45+
run: npm run ci:e2e
4646

4747
e2e_windows:
4848
runs-on: windows-latest
@@ -52,7 +52,7 @@ jobs:
5252
- name: Enable Debugging
5353
run: |
5454
echo "::debug::Debugging enabled"
55-
- uses: actions/checkout@v3
55+
- uses: actions/checkout@v4
5656
- uses: actions/setup-node@v3
5757
with:
5858
node-version: 18
@@ -83,14 +83,14 @@ jobs:
8383
run: npm run lint
8484

8585
- name: Run E2E Tests
86-
run: cd e2e && npm install && npm test
86+
run: npm run ci:e2e
8787

8888
e2e_macos:
8989
runs-on: macos-latest
9090
name: Test on MacOS
9191

9292
steps:
93-
- uses: actions/checkout@v3
93+
- uses: actions/checkout@v4
9494
- uses: actions/setup-node@v3
9595
with:
9696
node-version: 18
@@ -109,4 +109,4 @@ jobs:
109109
run: npm run lint
110110

111111
- name: Run Tests
112-
run: cd e2e && npm install && npm test
112+
run: npm run ci:e2e

.github/workflows/TESTS.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: [16, 18, 20]
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
- uses: actions/setup-node@v3
2424
with:
2525
node-version: ${{ matrix.node-version }}
@@ -38,7 +38,7 @@ jobs:
3838
runs-on: windows-latest
3939

4040
steps:
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
- uses: actions/setup-node@v3
4343
with:
4444
node-version: 18
@@ -57,7 +57,7 @@ jobs:
5757
runs-on: macos-latest
5858

5959
steps:
60-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@v4
6161
- uses: actions/setup-node@v3
6262
with:
6363
node-version: 18

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ _temp/
1212
*solhintReport*.*
1313
.env
1414
**/.DS_Store
15-
15+
solhint*.tgz

CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
## [5.1.0] - 2025-05-05
2+
### Added
3+
- Argument to avoid discord poster - [#646](https://github.com/protofire/solhint/pull/646)
4+
- Auto-fix for `no-unused-import` - [#648](https://github.com/protofire/solhint/pull/648) (Thanks to [@DenisGorbachev](https://github.com/DenisGorbachev))
5+
- New Rule: import-path-check - [#657](https://github.com/protofire/solhint/pull/657)
6+
7+
8+
### Updated
9+
- yml and parser update - [#668](https://github.com/protofire/solhint/pull/668) (Thanks to [@zeevick10](https://github.com/zeevick10))
10+
- cleanup deprecated code - [#655](https://github.com/protofire/solhint/pull/655)
11+
- Improved `ordering` rule - [#656](https://github.com/protofire/solhint/pull/656)
12+
13+
14+
### BREAKING CHANGE
15+
16+
- Removed code for `solhint:default` ruleset - [#654](https://github.com/protofire/solhint/pull/654)
17+
18+
19+
Thanks to [@fanqiaojun](https://github.com/fanqiaojun), [@maximevtush](https://github.com/maximevtush), [@MaxweLL22-22](https://github.com/MaxweLL22-22), [@PixelPil0t1](https://github.com/PixelPil0t1), [@wgyt](https://github.com/wgyt), [@operagxsasha](https://github.com/operagxsasha), [@Hopium21](https://github.com/Hopium21), [@leopardracer](https://github.com/leopardracer), [@omahs](https://github.com/omahs), [@zeevick10](https://github.com/zeevick10), [@gap-editor](https://github.com/gap-editor), [@Olexandr88](https://github.com/Olexandr88), [@jirutka](https://github.com/jirutka)
20+
21+
For making the time of pointing out typos, license update, broken links, unused code, copyright, small reviews, etc. We really appreciate your contributions!
22+
23+
<br><br>
24+
25+
126
## [5.0.5] - 2025-01-16
227
### Fixed
328
- `gas-custom-errors` [#620](https://github.com/protofire/solhint/pull/620) - Support for Custom Errors inside `require` statements
@@ -143,7 +168,7 @@ Thanks to [@juanpcapurro](https://github.com/juanpcapurro) for providing the cod
143168

144169

145170
### Added
146-
- Official Docker Image [#524](https://github.com/protofire/solhint/pull/524) (Thanks to [@keypee](https://github.com/keypee90))
171+
- Official Docker Image [#524](https://github.com/protofire/solhint/pull/524) (Thanks to [@kaypee90](https://github.com/kaypee90))
147172
- Autofix for `payable-fallback` rule [#528](https://github.com/protofire/solhint/pull/528)
148173
- Autofix for `quotes` rule [#529](https://github.com/protofire/solhint/pull/529)
149174
- Autofix for `avoid-suicide` rule [#531](https://github.com/protofire/solhint/pull/531)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Protofire
3+
Copyright (c) 2017-2025 Protofire
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
By <a href="https://protofire.io/" target="_blank">Protofire</a>
66
</p>
77

8-
[![](https://img.shields.io/badge/Solhint%20Website-cyan)](https://protofire.io/projects/solhint)
8+
[![](https://img.shields.io/badge/Solhint%20Website-cyan)](https://protofire.io/solhint)
99
[![](https://img.shields.io/badge/Join%20Our%20Discord-magenta)](https://discord.gg/4TYGq3zpjs)
1010
[![Donate with Ethereum](https://img.shields.io/badge/Donate-ETH-blue)](https://etherscan.io/address/0xA81705c8C247C413a19A244938ae7f4A0393944e)
1111
[![NPM version](https://badge.fury.io/js/solhint.svg)](https://npmjs.org/package/solhint)
@@ -38,7 +38,7 @@ First initialize a configuration file, if you don't have one:
3838
solhint --init
3939
```
4040

41-
This will create a `.solhint.json` file with the default rules enabled. Then run Solhint with one or more [Globs](https://en.wikipedia.org/wiki/Glob_(programming)) as arguments. For example, to lint all files inside `contracts` directory, you can do:
41+
This will create a `.solhint.json` file with the recommended rules enabled. Then run Solhint with one or more [Globs](https://en.wikipedia.org/wiki/Glob_(programming)) as arguments. For example, to lint all files inside `contracts` directory, you can do:
4242

4343
```sh
4444
solhint 'contracts/**/*.sol'
@@ -90,7 +90,7 @@ This option currently works on:
9090
- private-vars-underscore
9191
- payable-fallback
9292
- quotes
93-
- contract-name-camelcase
93+
- contract-name-capwords
9494
- avoid-suicide
9595

9696
<br><br>
@@ -108,11 +108,12 @@ This file has the following format:
108108
### Default
109109
```json
110110
{
111-
"extends": "solhint:default"
111+
"extends": "solhint:recommended"
112112
}
113113
```
114114
### Note
115115
The `solhint:default` configuration contains only two rules: max-line-length & no-console
116+
It is now deprecated since version 5.1.0
116117
<br><br>
117118

118119

@@ -139,9 +140,9 @@ additional-tests.sol
139140

140141
### Extendable rulesets
141142

142-
The default rulesets provided by solhint are the following:
143+
The rulesets provided by solhint are the following:
143144

144-
+ solhint:default
145+
+ solhint:default (deprecated since version v5.1.0)
145146
+ solhint:recommended
146147

147148
Use one of these as the value for the "extends" property in your configuration file.
@@ -238,7 +239,6 @@ Related documentation you may find [here](https://protofire.github.io/solhint/).
238239
239240
## Table of Contents
240241
241-
* [Roadmap](ROADMAP.md): The core project's roadmap - what the core team is looking to work on in the near future.
242242
* [Contributing](docs/contributing.md): The core Solhint team :heart: contributions. This describes how you can contribute to the Solhint Project.
243243
* [Shareable configs](docs/shareable-configs.md): How to create and share your own configurations.
244244
* [Writing plugins](docs/writing-plugins.md): How to extend Solhint with your own rules.

conf/rulesets/solhint-all.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = Object.freeze({
3737
'gas-struct-packing': 'warn',
3838
'comprehensive-interface': 'warn',
3939
'duplicated-imports': 'warn',
40+
'import-path-check': ['warn', ['[~dependenciesPath]']],
4041
quotes: ['error', 'double'],
4142
'const-name-snakecase': 'warn',
4243
'contract-name-capwords': 'warn',

conf/rulesets/solhint-default.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)