(f *core.File, state *walker, txt string)
| 146 | } |
| 147 | |
| 148 | func (l *Linter) lintScope(f *core.File, state *walker, txt string) error { |
| 149 | for _, tag := range state.tagHistory { |
| 150 | scope, match := tagToScope[tag] |
| 151 | if (match && !core.StringInSlice(tag, inlineTags)) || heading.MatchString(tag) { |
| 152 | if scope == "text.blockquote" || scope == "text.list" { |
| 153 | f.Summary.WriteString(txt + "\n\n") |
| 154 | } |
| 155 | |
| 156 | if !match { |
| 157 | scope = "text.heading." + tag |
| 158 | } |
| 159 | f.Metrics[strings.TrimPrefix(scope, "text.")]++ |
| 160 | |
| 161 | txt = strings.TrimLeft(txt, " ") |
| 162 | b := state.block(txt, scope+l.metaScope+f.RealExt) |
| 163 | return l.lintBlock(f, b, state.lines, 0, false) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | f.Summary.WriteString(txt + "\n\n") |
| 168 | |
| 169 | b := state.block(txt, "text"+l.metaScope+f.RealExt) |
| 170 | return l.lintProse(f, b, state.lines) |
| 171 | } |
| 172 | |
| 173 | func (l *Linter) lintSizedScopes(f *core.File) error { |
| 174 | f.ResetComments() |
no test coverage detected