Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Test problems with a ~/.tidyrc loaded #30

Open
geoffmcl opened this issue Sep 7, 2018 · 1 comment
Open

Test problems with a ~/.tidyrc loaded #30

geoffmcl opened this issue Sep 7, 2018 · 1 comment
Labels

Comments

@geoffmcl
Copy link
Contributor

geoffmcl commented Sep 7, 2018

Both the tools cmd and sh specifically ensure a pre-command line config file load from the ENV variable HTML_TIDY, they do not check that a ~/.tidyrc exists...

Such a config file could pre-set any config the regression tests want to set up... and yield different results...

If detected, the test script should abort with a warning like - default config file ~/.tidyrc found. delete, rename, move before continuing... ....

The issue 752 exposed this failing... thanks...

Look forward to feedback, patches, PR's to fix this short falling in the current test scripts...

@geoffmcl
Copy link
Contributor Author

geoffmcl commented Nov 7, 2018

The other default config - /etc/tidy.conf - can also cause problems...

In UNIX that is compiled into the console application, tidy.c, and the tests can appear to FAIL if /etc/tidy.conf exists, even as a null, or with only comments...

In test 1003361, 1004051, and others, the loading of even effectively a null file, causes some config change, and the indent: auto is lost... thus the diff -ua expects results goes mad...

While thought could/should be given to making the tools detect, and warn of a possible problems, given that these are user electable cmake options, compiled into the app, the tools can not detect all cases...

Maybe the tool could run $ tidy -help-env, check what is written, search and warn, or error, if any of the conditions are met... hmmm... possible, but quite some work...

Of course adding a new option, like say -no-config, to tidy, which inhibits tidy loading these files, would be the best fix... Will try to raise that as an issue there, if no one beats me to it...

Meantime, this stands open as a WARNING to regression testers...

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

No branches or pull requests

1 participant