Skip to content

Commit

Permalink
Merge branch 'master' into fix-reports-0-undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dbale-altoros authored Jan 25, 2023
2 parents 61be87c + 6b3c7ea commit 9b6039e
Show file tree
Hide file tree
Showing 180 changed files with 10,012 additions and 6,292 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
coverage
node_modules
scripts
e2e
/_temp
9 changes: 5 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
module.exports = {
parserOptions: {
ecmaVersion: 8
ecmaVersion: 8,
},
env: {
browser: false,
node: true,
commonjs: true,
es6: true,
mocha: true
mocha: true,
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
rules: {
'consistent-return': 'off',
'import/no-dynamic-require': 'off',
'max-classes-per-file': 'off',
'import/no-extraneous-dependencies': ['error', { optionalDependencies: true }],
'global-require': 'off',
'no-bitwise': 'off',
Expand All @@ -32,6 +33,6 @@ module.exports = {
'class-methods-use-this': 'off',
'guard-for-in': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off'
}
'no-underscore-dangle': 'off',
},
}
4 changes: 3 additions & 1 deletion .github/workflows/E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ jobs:
name: Test on Linux with Node ${{ matrix.node }}
strategy:
matrix:
node: [10, 12]
node: [14, 16]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: pack
run: npm pack
- name: lint
run: npm install && npm run lint
- name: install-globally
run: npm i -g solhint*tgz
- name: run-e2e-tests
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ convertLib.sol
/docs/Gemfile*
antlr4.jar
/docs/.sass-cache/
.stryker-tmp/
_temp/
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [3.3.8] - 2023-01-17
### Fixed Docs and Typos
- [#292](https://github.com/protofire/solhint/pull/292)
- [#343](https://github.com/protofire/solhint/pull/343)
- [#355](https://github.com/protofire/solhint/pull/355)
- [#285](https://github.com/protofire/solhint/pull/285)

### Added
- Lint rule for banning "console.sol" and "import hardhat/console.sol" [#372](https://github.com/protofire/solhint/pull/372)

### Updated
- Solidity Parser to 0.14.5 [#378](https://github.com/protofire/solhint/pull/378)


<br><br>
## TIME GAP
## [2.1.0] - 2019-05-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion conf/rulesets/solhint-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { loadRules } = require('../../lib/load-rules')
const rulesConstants = loadRules()
const enabledRules = {}

rulesConstants.forEach(rule => {
rulesConstants.forEach((rule) => {
if (!rule.meta.deprecated) {
enabledRules[rule.ruleId] = rule.meta.defaultSetup
}
Expand Down
2 changes: 1 addition & 1 deletion conf/rulesets/solhint-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { loadRules } = require('../../lib/load-rules')
const rulesConstants = loadRules()
const enabledRules = {}

rulesConstants.forEach(rule => {
rulesConstants.forEach((rule) => {
if (!rule.meta.deprecated && rule.meta.isDefault) {
enabledRules[rule.ruleId] = rule.meta.defaultSetup
}
Expand Down
2 changes: 1 addition & 1 deletion conf/rulesets/solhint-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { loadRules } = require('../../lib/load-rules')
const rulesConstants = loadRules()
const enabledRules = {}

rulesConstants.forEach(rule => {
rulesConstants.forEach((rule) => {
if (!rule.meta.deprecated && rule.meta.recommended) {
enabledRules[rule.ruleId] = rule.meta.defaultSetup
}
Expand Down
4 changes: 2 additions & 2 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: "default"
title: "Rule Index of Solhint"
---

## Best Practise Rules
## Best Practice Rules

| Rule Id | Error | Recommended |
| ------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ----------- |
Expand Down Expand Up @@ -64,7 +64,7 @@ title: "Rule Index of Solhint"
| [no-complex-fallback](./rules/security/no-complex-fallback.md) | Fallback function must be simple. | ✔️ |
| [no-inline-assembly](./rules/security/no-inline-assembly.md) | Avoid to use inline assembly. It is acceptable only in rare cases. | ✔️ |
| [not-rely-on-block-hash](./rules/security/not-rely-on-block-hash.md) | Do not rely on "block.blockhash". Miners can influence its value. | ✔️ |
| [not-rely-on-time](./rules/security/not-rely-on-time.md) | Avoid to make time-based decisions in your business logic. | ✔️ |
| [not-rely-on-time](./rules/security/not-rely-on-time.md) | Avoid making time-based decisions in your business logic. | ✔️ |
| [reentrancy](./rules/security/reentrancy.md) | Possible reentrancy vulnerabilities. Avoid state changes after transfer. | ✔️ |
| [state-visibility](./rules/security/state-visibility.md) | Explicitly mark visibility of state. | ✔️ |
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/miscellaneous/comprehensive-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: "comprehensive-interface | Solhint"
![Default Severity Badge warn](https://img.shields.io/badge/Default%20Severity-warn-yellow)

## Description
Check that all public or external functions are override. This is iseful to make sure that the whole API is extracted in an interface.
Check that all public or external functions are override. This is useful to make sure that the whole API is extracted in an interface.

## Options
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/security/not-rely-on-time.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ title: "not-rely-on-time | Solhint"

## Description
Avoid to make time-based decisions in your business logic.
Avoid making time-based decisions in your business logic.

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

0 comments on commit 9b6039e

Please sign in to comment.