11use criterion:: { Criterion , black_box, criterion_group, criterion_main} ;
22use harper_core:: linting:: { LintGroup , Linter } ;
3- use harper_core:: { Document , FstDictionary } ;
3+ use harper_core:: { Dialect , Document , FstDictionary } ;
44
55static ESSAY : & str = include_str ! ( "./essay.md" ) ;
66
@@ -12,7 +12,7 @@ fn parse_essay(c: &mut Criterion) {
1212
1313fn lint_essay ( c : & mut Criterion ) {
1414 let dictionary = FstDictionary :: curated ( ) ;
15- let mut lint_set = LintGroup :: new_curated ( dictionary) ;
15+ let mut lint_set = LintGroup :: new_curated ( dictionary, Dialect :: American ) ;
1616 let document = Document :: new_markdown_default_curated ( black_box ( ESSAY ) ) ;
1717
1818 c. bench_function ( "lint_essay" , |b| {
@@ -24,7 +24,7 @@ fn lint_essay_uncached(c: &mut Criterion) {
2424 c. bench_function ( "lint_essay_uncached" , |b| {
2525 b. iter ( || {
2626 let dictionary = FstDictionary :: curated ( ) ;
27- let mut lint_set = LintGroup :: new_curated ( dictionary. clone ( ) ) ;
27+ let mut lint_set = LintGroup :: new_curated ( dictionary. clone ( ) , Dialect :: American ) ;
2828 let document = Document :: new_markdown_default ( black_box ( ESSAY ) , & dictionary) ;
2929 lint_set. lint ( & document)
3030 } )
0 commit comments