Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect total number of documents reported #189

Open
MarkvanMents opened this issue Apr 29, 2022 · 0 comments
Open

Incorrect total number of documents reported #189

MarkvanMents opened this issue Apr 29, 2022 · 0 comments
Labels

Comments

@MarkvanMents
Copy link

MarkvanMents commented Apr 29, 2022

Describe the bug

The total number of documents scanned is incorrectly reported if

  • Only one file is selected using FilePath option
  • Directories are excluded using IgnoreDirs option

To Reproduce

Steps to reproduce the behaviour:

  1. Run with config and options FilePath: "aSingleFile"

  2. See error tested 6951 documents - should be 1 document

  3. Run with config and options

IgnoreDirs:
- "_print"
  1. See error tested 6951 documents - should be 3469 documents as the rest are in the _print directory - (the _print directory is still being ignored as errors there are not reported).
    (I think this latter bug is a result of Fix panic when referencing ignored directories #181 ?)

Expected behaviour

I would expect to see the number of documents which were actually tested.

Actual behaviour

Always lists the total number of documents in the documentStore using

// CountDocuments : Return number of documents in hT document store
func (hT *HTMLTest) CountDocuments() int {
	return len(hT.documentStore.Documents)
}

Versions

  • OS: Windows 10/Ubuntu 16.04.7 LTS
  • htmltest: 0.16.0

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant