-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af1c996
commit 121fbe7
Showing
13 changed files
with
413 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "solhint:all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.6.0; | ||
|
||
contract Foo { | ||
uint256 public constant test1 = 1; | ||
uint256 TEST2; | ||
|
||
constructor() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.5.8; | ||
|
||
contract Foo { | ||
uint256 public constant test1 = 1; | ||
|
||
constructor() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.5.8; | ||
|
||
contract Foo { | ||
uint256 public constant TEST1 = 1; | ||
uint256 public value; | ||
|
||
function _goodContract() private { | ||
value = TEST1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
const foo1Output = [ | ||
{ | ||
line: 2, | ||
column: 1, | ||
severity: 2, | ||
message: 'Compiler version >=0.6.0 does not satisfy the ^0.5.8 semver requirement', | ||
ruleId: 'compiler-version', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 5, | ||
column: 5, | ||
severity: 3, | ||
message: 'Constant name must be in capitalized SNAKE_CASE', | ||
ruleId: 'const-name-snakecase', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 6, | ||
column: 5, | ||
severity: 3, | ||
message: 'Explicitly mark visibility of state', | ||
ruleId: 'state-visibility', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 6, | ||
column: 5, | ||
severity: 3, | ||
message: "'TEST2' should start with _", | ||
ruleId: 'private-vars-leading-underscore', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 6, | ||
column: 5, | ||
severity: 3, | ||
message: 'Variable name must be in mixedCase', | ||
ruleId: 'var-name-mixedcase', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 8, | ||
column: 5, | ||
severity: 3, | ||
message: | ||
'Explicitly mark visibility in function (Set ignoreConstructors to true if using solidity >=0.7.0)', | ||
ruleId: 'func-visibility', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
{ | ||
line: 8, | ||
column: 19, | ||
severity: 3, | ||
message: 'Code contains empty blocks', | ||
ruleId: 'no-empty-blocks', | ||
fix: null, | ||
filePath: 'contracts/Foo.sol', | ||
}, | ||
] | ||
|
||
const foo2Output = [ | ||
{ | ||
line: 5, | ||
column: 5, | ||
severity: 3, | ||
message: 'Constant name must be in capitalized SNAKE_CASE', | ||
ruleId: 'const-name-snakecase', | ||
fix: null, | ||
filePath: 'contracts/Foo2.sol', | ||
}, | ||
{ | ||
line: 7, | ||
column: 5, | ||
severity: 3, | ||
message: | ||
'Explicitly mark visibility in function (Set ignoreConstructors to true if using solidity >=0.7.0)', | ||
ruleId: 'func-visibility', | ||
fix: null, | ||
filePath: 'contracts/Foo2.sol', | ||
}, | ||
{ | ||
line: 7, | ||
column: 19, | ||
severity: 3, | ||
message: 'Code contains empty blocks', | ||
ruleId: 'no-empty-blocks', | ||
fix: null, | ||
filePath: 'contracts/Foo2.sol', | ||
}, | ||
] | ||
|
||
module.exports = { foo1Output, foo2Output } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,10 @@ | |
|
||
files in this directory are pulled from eslint repository: | ||
|
||
- table.js: eslint v5.6.0 Gajus Kuizinas <[email protected]> | ||
- unix.js: eslint v8.32.0 oshi-shinobu | ||
- tap.js: eslint v8.32.0 Jonathan Kingston | ||
- stylish.js: eslint v8.32.0 by Sindre Sorhus | ||
- json.js: eslint v8.32.0 by Artur Lukianov & Diego Bale | ||
- table.js: eslint - Gajus Kuizinas | ||
- unix.js: eslint - oshi-shinobu | ||
- tap.js: eslint - Jonathan Kingston | ||
- stylish.js: eslint - Sindre Sorhus | ||
- json.js: eslint - Artur Lukianov & Diego Bale | ||
- compact.js: eslint - Nicholas C. Zakas | ||
|
Oops, something went wrong.