check_internal_hash seems to be always true
josunect opened this issue · comments
Summary
I was trying to avoid the check for the internal hashes, but it doesn't look like it is picking up the option using the command line
Steps to Reproduce
(Needs to be a project with missing internal hashes)
bin/htmlproofer ~/dev/public --allow-missing-href --check-external-hash --enforce-https false --check-internal-hash false
bin/htmlproofer ~/dev/public --allow-missing-href --check-external-hash --enforce-https false --check-internal-hash
A clear and concise description of what you expected to happen
Expected to find the output:
HTML-Proofer finished successfully.
What actually happened
The output received is many of these validation errors:
internally linking to <page>; the file exists, but the hash 'page-cr' does not
Other information
I think if just this option accepts one value, it could be possible to be changed:
p.option 'check_internal_hash', '--check-internal-hash <false>', 'Checks whether internal hashes exist (even if the webpage exists) (default: `true`).'
options[:check_internal_hash] = false if opts['check_internal_hash'] == "false"
Or probably it should be passed other way?
OS Version
Ubuntu 22.04 LTS
ruby 3.0.2p107
HTML-Proofer Version
htmlproofer 4.2.0
This is a dupe of #735 and the fix will be released in an hour or so.
You'll be able to do --check-internal-hash=false
when 4.3.0 is released soon.