@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
66use rules:: { instantiate_rules, CurrentRules } ;
77use rules:: { spacing:: { SpBraceOptions , SpPunctOptions , NspFunparOptions ,
88 NspInparenOptions , NspUnaryOptions , NspTrailingOptions } ,
9- indentation:: { LongLineOptions , IN3Options ,
9+ indentation:: { LongLineOptions , IN2Options , IN3Options ,
1010 IN9Options , ContinuationLineOptions } ,
1111 } ;
1212use crate :: analysis:: { DMLError , IsolatedAnalysis , LocalDMLError } ;
@@ -55,6 +55,8 @@ pub struct LintCfg {
5555 #[ serde( default ) ]
5656 pub long_lines : Option < LongLineOptions > ,
5757 #[ serde( default ) ]
58+ pub in2 : Option < IN2Options > ,
59+ #[ serde( default ) ]
5860 pub in3 : Option < IN3Options > ,
5961 #[ serde( default ) ]
6062 pub continuation_line : Option < ContinuationLineOptions > ,
@@ -74,6 +76,7 @@ impl Default for LintCfg {
7476 long_lines : Some ( LongLineOptions {
7577 max_length : MAX_LENGTH_DEFAULT ,
7678 } ) ,
79+ in2 : Some ( IN2Options { } ) ,
7780 in3 : Some ( IN3Options { indentation_spaces : 4 } ) ,
7881 continuation_line : Some ( ContinuationLineOptions {
7982 indentation_spaces : INDENTATION_LEVEL_DEFAULT ,
@@ -126,6 +129,7 @@ pub fn begin_style_check(ast: TopAst, file: String, rules: &CurrentRules) -> Res
126129 // Per line checks
127130 let lines: Vec < & str > = file. lines ( ) . collect ( ) ;
128131 for ( row, line) in lines. iter ( ) . enumerate ( ) {
132+ rules. in2 . check ( & mut linting_errors, row, line) ;
129133 rules. long_lines . check ( & mut linting_errors, row, line) ;
130134 rules. nsp_trailing . check ( & mut linting_errors, row, line) ;
131135 }
0 commit comments