@@ -23,9 +23,7 @@ type Linter struct {
2323 Manager * check.Manager
2424 glob * glob.Glob
2525 client * http.Client
26- HasDir bool
2726 nonGlobal bool
28- metaScope string
2927
3028 // adoc holds the Asciidoctor processes this run is using, and adocOnce
3129 // starts them the first time an AsciiDoc file is seen.
@@ -104,18 +102,6 @@ func (l *Linter) LintString(src string) ([]*core.File, error) {
104102 return []* core.File {linted .file }, linted .err
105103}
106104
107- // SetMetaScope sets an optional meta scope.
108- //
109- // A meta scope is a string that is appended to the end of each check's scope
110- // providing extra context for the check.
111- func (l * Linter ) SetMetaScope (scope string ) {
112- if scope != "" {
113- l .metaScope = "." + scope
114- } else {
115- l .metaScope = ""
116- }
117- }
118-
119105// Lint src according to its format.
120106func (l * Linter ) Lint (input []string , pat string ) ([]* core.File , error ) {
121107 var linted []* core.File
@@ -306,12 +292,12 @@ func (l *Linter) lintProse(f *core.File, blk nlp.Block, lines int) error {
306292}
307293
308294func (l * Linter ) lintTxt (f * core.File ) error {
309- block := nlp .NewBlock ("" , f .Content , "text" + l . metaScope + f .RealExt )
295+ block := nlp .NewBlock ("" , f .Content , "text" + f . MetaScope + f .RealExt )
310296 return l .lintProse (f , block , len (f .Lines ))
311297}
312298
313299func (l * Linter ) lintLines (f * core.File ) error {
314- block := nlp .NewBlock ("" , f .Content , "text" + l . metaScope + f .RealExt )
300+ block := nlp .NewBlock ("" , f .Content , "text" + f . MetaScope + f .RealExt )
315301 return l .lintBlock (f , block , len (f .Lines ), 0 , true )
316302}
317303
0 commit comments