Skip to content

Validate with libtidy on travis #1420

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

Closed
wants to merge 2 commits into from
Closed

Conversation

spk
Copy link
Contributor

@spk spk commented Jun 29, 2016

Use libtidy https://github.com/htacg/tidy-html5
for complete validation of the website, just excluding examples directory (inserted in javascript).
Also update validate-website gem.

Time ~ 40sec for check:markup cf https://travis-ci.org/ruby/www.ruby-lang.org/builds/501125031#L582

Cheers

@stomar
Copy link
Contributor

stomar commented Jun 30, 2016

HTML validation on Travis has been discussed before, I think.

IMO it's a bad idea to check every build:

  • it's really not necessary since the HTML layouts very rarely change; most commits only add/change markdown, which usually does not introduce malformed HTML
  • it takes way too much time (the build of this PR took 8 min 22 s); note that there already have been complaints about the current 2...3 min

I rather think that occasional validations should be sufficient.

@spk spk force-pushed the travis-validator branch from 945dd4a to d8b7590 Compare March 3, 2019 14:57
@spk spk requested review from a team as code owners March 3, 2019 14:57
@spk spk changed the title Validate with validator.nu jar on travis Validate with libtidy on travis Mar 3, 2019
@spk
Copy link
Contributor Author

spk commented Mar 3, 2019

Hi, I've updated the PR using libtidy (around 40sec to check all files) and fixes the errors hope we could reconsider including the changes, thanks

@spk spk mentioned this pull request Mar 3, 2019
@spk spk force-pushed the travis-validator branch from e9c0c5c to 8a1d8db Compare March 4, 2019 09:31
.travis.yml Outdated
@@ -1,9 +1,14 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change

Suggested change
---

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its yaml headers recommended by linters should i remove it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in fea533e

@stomar
Copy link
Contributor

stomar commented Mar 4, 2019

It‘s a little confusing: this is supposed to target CI, but commit message says „locally“.

@spk
Copy link
Contributor Author

spk commented Mar 4, 2019

It‘s a little confusing: this is supposed to target CI, but commit message says „locally“.

you are right its confusing i will remove this

@spk spk force-pushed the travis-validator branch from 8a1d8db to 50e091b Compare March 4, 2019 10:33
@stomar
Copy link
Contributor

stomar commented Mar 4, 2019

After a closer look I feel I have to close this PR, since it doesn‘t make any sense to run on CI in this form, and would even be harmful.

The problem is that the validation task does not check the current build but the already deployed site. This would mean that a PR introducing errors would not fail on CI, but all subsequent PRs would, regardless of whether they introduce errors or not.

@stomar stomar closed this Mar 4, 2019
@stomar
Copy link
Contributor

stomar commented Mar 4, 2019

As to the general question whether this check should (in a fixed version) be added to CI: 40 seconds is not too bad, but personally I’m still undecided and would like to have some other opinions.

@hsbt

@spk
Copy link
Contributor Author

spk commented Mar 4, 2019

The problem is that the validation task does not check the current build but the already deployed site. This would mean that a PR introducing errors would not fail on CI, but all subsequent PRs would, regardless of whether they introduce errors or not.

This is not correct this test the current branch since it check the build-ed _site generated on CI. cf https://github.com/ruby/www.ruby-lang.org/blob/master/lib/markup_checker.rb#L7

@spk spk deleted the travis-validator branch March 4, 2019 21:01
@spk
Copy link
Contributor Author

spk commented Mar 4, 2019

Reopened in #1990 to have team feedback

@stomar
Copy link
Contributor

stomar commented Mar 4, 2019

Then please remind me what is the meaning of the —site https://www.ruby-lang.org/ option?

Update: it seems besides getting displayed the URL has no use.

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

Successfully merging this pull request may close these issues.

2 participants