{"id":25215626,"url":"https://github.com/deezer/html-linter","last_synced_at":"2025-07-31T19:33:21.283Z","repository":{"id":16771966,"uuid":"19530085","full_name":"deezer/html-linter","owner":"deezer","description":"HTML5 Linter based on Google Style Guide","archived":false,"fork":false,"pushed_at":"2021-11-05T17:01:42.000Z","size":208,"stargazers_count":51,"open_issues_count":7,"forks_count":13,"subscribers_count":41,"default_branch":"master","last_synced_at":"2024-04-16T11:27:17.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deezer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-07T10:19:26.000Z","updated_at":"2023-12-01T02:50:03.000Z","dependencies_parsed_at":"2022-08-25T11:10:45.655Z","dependency_job_id":null,"html_url":"https://github.com/deezer/html-linter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deezer%2Fhtml-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deezer%2Fhtml-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deezer%2Fhtml-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deezer%2Fhtml-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deezer","download_url":"https://codeload.github.com/deezer/html-linter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238161490,"owners_count":19426669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-10T18:15:11.622Z","updated_at":"2025-02-10T18:15:12.179Z","avatar_url":"https://github.com/deezer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"HTML Linter\n===========\n\n.. image:: https://badge.fury.io/py/html-linter.png\n    :target: http://badge.fury.io/py/html-linter\n\n.. image:: https://travis-ci.org/deezer/html-linter.png?branch=master\n    :target: https://travis-ci.org/deezer/html-linter\n\n.. image:: https://coveralls.io/repos/deezer/html-linter/badge.png?branch=master\n    :target: https://coveralls.io/r/deezer/html-linter?branch=master\n\n\nHTML Linter is an HTML5 linter that follows the style guide defined by Google.\n\nMotivation\n----------\n\nHandling HTML5 files generated by lots of different of people is a difficult\ntask, because the standard is evolving quite fast and also because browsers are\nquite open to accept any malformed/invalid/incomplete input.\n\nThat's why we decided to have an automated tool to check our coding standard.\n\nWe start with the\n`Google standard \u003chttps://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml\u003e`_\nand we enhance it with some extra rules deinfed by the project\n`html-minifier \u003chttps://github.com/kangax/html-minifier\u003e`_. You can read his\ndetailed `article \u003chttp://perfectionkills.com/experimenting-with-html-minifier/#remove_redundant_attributes\u003e`_.\n\nThe list of extra rules we added are:\n\n* Boolean attributes should not have an explicit value.\n* Do not use the name attribute in a tags.\n* Do not use the language attribute in script tags.\n* Do not use the charset attribute in script tags when there is no source.\n* Javascript:void(0) links are evil.\n* onclick='javascript: ...' is not required. This will raise also a Concerns Separation error.\n* meta http-equiv: use only standard properties + X-UA-compatible\n* No extra whitespaces between attributes or before the opening or closing tag.\n\nWhat is missing?\n----------------\n\nCheck if the file has BOM.\n\nThe abbility to validate the HTML using the tool\n`HTML5 tidy \u003chttps://w3c.github.io/tidy-html5/\u003e`_ and to integrate some\nschema.org or microdata validator.\n\nHowever, we do not have any short terms plans to handle the latter, due to a\ncouple of reasons:\n\n* Tidy can be easily integrated using the tool `git-lint \u003chttps://github.com/sk-/git-lint\u003e`_\n* Any other validator can also be integrated with `git-lint \u003chttps://github.com/sk-/git-lint\u003e`_\n* Adding any extra validator would pull many more dependencies and change the scope.\n\nLimitations\n-----------\n\nhtml_linter used the project\n`template-remover \u003chttps://github.com/deezer/template-remover\u003e`_ to remove the\nPHP and Jinja markup from the files and this project works has some limitations.\n\n\nOne example that won't work is the following::\n\n  \u003c?php echo \"?\u003e\" ?\u003e\n\nThe reason it does not work is because when the method sees the first '?\u003e'\n(the one inside the string), it thinks it's a closing tag.\n\n\nExample use\n-----------\n\nBelow are example of how template_remover.py is used::\n\n  $ html_lint.py filename.html\n\n\nInstallation\n------------\n\nYou can install, upgrade or uninstall html-linter with these commands::\n\n  $ pip install html-linter\n  $ pip install --upgrade html-linter\n  $ pip uninstall html-linter\n\nPython Versions\n---------------\n\nPython 2.7 is officially supported, 3.2, 3.3 and 3.4 should also work.\n\nDevelopment\n-----------\n\nHelp for this project is more than welcomed, so feel free to create an issue or\nto send a pull request via http://github.com/deezer/html-linter.\n\nTests are run using nose, either with::\n\n  $ python -R setup.py nosetests\n  $ nosetests\n\nUse the tool `git-lint \u003chttps://github.com/sk-/git-lint\u003e`_ before any commit, so\nerrors and style problems are caught early.\n\nTODOS and Possible Features\n---------------------------\n\n* Make the output less verbose.\n* Integrate with HTML5 tidy.\n* Integrate with a schema.org/micrdata validator.\n\n\nChangelog\n=========\n\nv0.1 (2014-05-07)\n-------------------\n\n* Initial commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeezer%2Fhtml-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeezer%2Fhtml-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeezer%2Fhtml-linter/lists"}