1
1
import { CodeWatcherModel } from './code-watcher.model' ;
2
2
3
3
const defaultCodeWatchers : CodeWatcherModel [ ] = [
4
- new CodeWatcherModel ( 'Duplicate Lines' , '^ (.*)(\\r?\\n\\1)+$ ' , 'g' ) ,
4
+ new CodeWatcherModel ( 'Duplicate Lines' , '(^|\\n) (.*)(\\r?\\n\\2(\\r?\\n|$))+ ' , 'g' ) ,
5
5
new CodeWatcherModel ( 'Console Output' , 'console\\.(log|error|info)' , 'g' , '\\.(ts|js|jsx)' ) ,
6
6
] ;
7
7
@@ -19,6 +19,7 @@ export class SettingsModel {
19
19
public expandStates : { [ key : string ] : boolean } ;
20
20
public commandTimeoutSeconds : number ;
21
21
public codeWatchers : CodeWatcherModel [ ] ;
22
+ public includeUnchangedInWatcherAnalysis : boolean ;
22
23
23
24
constructor ( darkMode : boolean = false ,
24
25
openRepos : string [ ] = [ '' ] ,
@@ -32,6 +33,7 @@ export class SettingsModel {
32
33
showTrackingPath : boolean = false ,
33
34
commitMessageAutcomplete : boolean = false ,
34
35
diffIgnoreWhitespace : boolean = false ,
36
+ includeUnchangedInWatcherAnalysis : boolean = true ,
35
37
codeWatchers : CodeWatcherModel [ ] = defaultCodeWatchers ) {
36
38
this . darkMode = darkMode ;
37
39
this . openRepos = openRepos ;
@@ -46,6 +48,7 @@ export class SettingsModel {
46
48
this . diffIgnoreWhitespace = diffIgnoreWhitespace ;
47
49
this . mergetool = mergetool ;
48
50
this . codeWatchers = codeWatchers ;
51
+ this . includeUnchangedInWatcherAnalysis = includeUnchangedInWatcherAnalysis ;
49
52
}
50
53
51
54
static sanitizePath ( path ) {
@@ -67,6 +70,7 @@ export class SettingsModel {
67
70
res . commitMessageAutocomplete = this . commitMessageAutocomplete ;
68
71
res . diffIgnoreWhitespace = this . diffIgnoreWhitespace ;
69
72
res . mergetool = this . mergetool ;
73
+ res . includeUnchangedInWatcherAnalysis = this . includeUnchangedInWatcherAnalysis ;
70
74
return res ;
71
75
}
72
76
}
0 commit comments