88const Solium = require ( "../../../../lib/solium" ) ,
99 wrappers = require ( "../../../utils/wrappers" ) ,
1010 { addPragma } = wrappers ;
11- const DEFAULT_MAX_ACCEPTABLE_LEN = 79 ;
11+ const DEFAULT_MAX_ACCEPTABLE_LEN = 145 ;
1212
1313function makeString ( length , character ) {
1414 return new Array ( length + 1 ) . join ( character ) ;
@@ -27,7 +27,7 @@ describe("[RULE] max-len: default len", function() {
2727
2828 describe ( "Acceptances" , function ( ) {
2929
30- it ( "should allow short line" , function ( done ) {
30+ it ( "should allow line length <= default acceptable " , function ( done ) {
3131 let name = makeString ( DEFAULT_MAX_ACCEPTABLE_LEN - "contract {}" . length , "a" ) ,
3232 code = `contract ${ name } {}` ,
3333 errors = Solium . lint ( addPragma ( code ) , this . userConfig ) ;
@@ -50,7 +50,7 @@ describe("[RULE] max-len: default len", function() {
5050
5151 describe ( "Rejections" , function ( ) {
5252
53- it ( "should reject long line on top level node" , function ( done ) {
53+ it ( "should reject line length > default acceptable on top level node" , function ( done ) {
5454 let name = makeString ( DEFAULT_MAX_ACCEPTABLE_LEN + 1 - "contract {}" . length , "a" ) ,
5555 code = `contract ${ name } {}` ,
5656 errors = Solium . lint ( addPragma ( code ) , this . userConfig ) ;
@@ -64,7 +64,7 @@ describe("[RULE] max-len: default len", function() {
6464 done ( ) ;
6565 } ) ;
6666
67- it ( "should reject long line on child node" , function ( done ) {
67+ it ( "should reject line length > default acceptable on child node" , function ( done ) {
6868 let name = makeString ( DEFAULT_MAX_ACCEPTABLE_LEN + 1 - " uint ;" . length , "a" ) ,
6969 code = (
7070 "contract dummy {\n" +
@@ -83,7 +83,7 @@ describe("[RULE] max-len: default len", function() {
8383 done ( ) ;
8484 } ) ;
8585
86- it ( "should reject long line only once" , function ( done ) {
86+ it ( "should reject line length > default acceptable only once" , function ( done ) {
8787 let name = makeString ( DEFAULT_MAX_ACCEPTABLE_LEN + 1 - " uint short;uint ;" . length , "a" ) ,
8888 code = (
8989 "contract dummy {\n" +
@@ -107,7 +107,7 @@ describe("[RULE] max-len: default len", function() {
107107describe ( "[RULE] max-len: custom len" , function ( ) {
108108
109109 before ( function ( done ) {
110- this . CUSTOM_MAX_ACCEPTABLE_LEN = 99 ;
110+ this . CUSTOM_MAX_ACCEPTABLE_LEN = 200 ;
111111 this . userConfig = {
112112 "rules" : {
113113 "max-len" : [ "error" , this . CUSTOM_MAX_ACCEPTABLE_LEN ]
@@ -118,7 +118,7 @@ describe("[RULE] max-len: custom len", function() {
118118
119119 describe ( "Acceptances" , function ( ) {
120120
121- it ( "should allow short line" , function ( done ) {
121+ it ( "should allow line length <= custom acceptable " , function ( done ) {
122122 let name = makeString ( this . CUSTOM_MAX_ACCEPTABLE_LEN - "contract {}" . length , "a" ) ,
123123 code = `contract ${ name } {}` ,
124124 errors = Solium . lint ( addPragma ( code ) , this . userConfig ) ;
@@ -141,7 +141,7 @@ describe("[RULE] max-len: custom len", function() {
141141
142142 describe ( "Rejections" , function ( ) {
143143
144- it ( "should reject long line on top level node" , function ( done ) {
144+ it ( "should reject line length > custom acceptable on top level node" , function ( done ) {
145145 let name = makeString ( this . CUSTOM_MAX_ACCEPTABLE_LEN + 1 - "contract {}" . length , "a" ) ,
146146 code = `contract ${ name } {}` ,
147147 errors = Solium . lint ( addPragma ( code ) , this . userConfig ) ;
@@ -155,7 +155,7 @@ describe("[RULE] max-len: custom len", function() {
155155 done ( ) ;
156156 } ) ;
157157
158- it ( "should reject long line on child node" , function ( done ) {
158+ it ( "should reject line length > custom acceptable on child node" , function ( done ) {
159159 let name = makeString ( this . CUSTOM_MAX_ACCEPTABLE_LEN + 1 - " uint ;" . length , "a" ) ,
160160 code = (
161161 "contract dummy {\n" +
@@ -174,7 +174,7 @@ describe("[RULE] max-len: custom len", function() {
174174 done ( ) ;
175175 } ) ;
176176
177- it ( "should reject long line only once" , function ( done ) {
177+ it ( "should reject line length > custom acceptable only once" , function ( done ) {
178178 let name = makeString ( this . CUSTOM_MAX_ACCEPTABLE_LEN + 1 - " uint short;uint ;" . length , "a" ) ,
179179 code = (
180180 "contract dummy {\n" +
0 commit comments