Skip to content

"Occurrence" not working as expected? #909

Closed Answered by adam-vest
adam-vest asked this question in Q&A
Discussion options

You must be logged in to vote

As it turns out, yes, this was a misunderstanding on my part. I was wanting this to search the entire doc, but the scope was where I was getting confused. In the above example, it will search each heading to ensure that the token isn't present multiple times in that heading. To get what I was looking for, I needed to increase the scope - the following seems to do what I was originally going for:

extends: occurrence
message: "Problem description heading does not occur exactly once"
ignorecase: true
scope: raw
level: error
min: 1
max: 1
token: "<h[1-9]>problem description"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adam-vest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant