Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions contracts/example/Test.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ contract Test {
b[5];
}

function test_longLine() external {
require(msg.sender == returnHighestBidder(_tokenId) || adminsContract.retrieveFunctionAdmin(msg.sender, _selector) == true || adminsContract.retrieveGlobalAdmin(msg.sender) == true, "Not allowed");

// 121 length
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567";

// 120 length
"012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456";
}

function test_delegatecall_inloop_1() payable external {
uint256 = sum;
for(uint i=0; i<10 ; i++) {
Expand Down
11 changes: 11 additions & 0 deletions src/issues/NC/lineLength.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { IssueTypes, RegexIssue } from '../../types';

const issue: RegexIssue = {
regexOrAST: 'Regex',
type: IssueTypes.NC,
title: 'Lines are too long',
description: 'The solidity style guide recommends a maximumum line length of [120 characters](https://docs.soliditylang.org/en/v0.8.17/style-guide.html#maximum-line-length)',
regex:/\S.{119,}\S/g,
};

export default issue;