ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - angelikatyborska/vnu-elixir: An Elixir client for the Nu HTML Checker (v.Nu).
An Elixir client for the Nu HTML Checker (v.Nu). Contribute to angelikatyborska/vnu-elixir development by creating an account on GitHub.
Visit Site

GitHub - angelikatyborska/vnu-elixir: An Elixir client for the Nu HTML Checker (v.Nu).

GitHub - angelikatyborska/vnu-elixir: An Elixir client for the Nu HTML Checker (v.Nu).

Vnu

GitHub Workflow status Hex.pm Hex.pm Hex.pm Coverage Status

An Elixir client for the Nu HTML Checker (v.Nu).

Expected HTML document to be valid, but got 1 error. Attribute html-is-awesome not allowed on element body at this point.

v.Nu is a document validity checker used by the W3C. It offers validating HTML, CSS, and SVG documents.

This library brings that functionality to Elixir by using the Checker's JSON API. It offers ExUnit assertions for validating dynamic content in tests, Mix tasks for validating static content, and general purpose functions to fulfill other needs.

Prerequisites

While it is possible to use this library with the service run by W3C at validator.w3.org/nu, I would recommend running your own instance. You will eliminate a lot of network latency if it runs on the same machine as your code, and you will not hit any rate limits that might exist for validator.w3.org/nu.

The source of the Checker can be found in the repository validator/validator. Follow their instructions on how to download it and run it as a web server.

The easiest option is to use the Docker image, like this:

docker run -d --rm -p 8888:8888 ghcr.io/validator/validator:latest

The command might require an additional --platform linux/amd64 flag on M1 macs.

Check if the server is running:

$ curl localhost:8888 -I
HTTP/1.1 200 OK

Installation

Make sure to read about the prerequisites first.

Add Vnu as a dependency to your project's mix.exs. To use the built-in, Hackney-based HTTP client adapter, also add :hackney:

defp deps do
  [
    {:vnu, "~> 1.1", only: [:dev, :test], runtime: false},
    {:hackney, "~> 1.18"}
  ]
end

Then run:

$ mix deps.get

If you don't want to use Hackney, you can implement your own HTTP client module using the Vnu.HTTPClient behavior and pass it in the http_client option.

Documentation

Available on hexdocs.pm.

Usage

See the usage guide.

Development

Make sure to read about the prerequisites first.

After cloning the repository, run mix deps.get and you should be ready for development.

To ensure code consistency, run mix lint.

Running tests

All test that expect to talk with the server accept the server's URL as an VNU_SERVER_URL environment variable or fallback to the default http://localhost:8888.

$ VNU_SERVER_URL=http://localhost:4000/ mix test 

If you're adding a new test, make sure it will do that do.

Contributing

Issues

If you noticed a problem with the library or its documentation, or have an idea for a feature, open an issue.

If you have an idea on how to act upon the problem or idea, feel free to open a pull request instead.

Pull requests

If you noticed a problem with the library or its documentation and know how to fix it, or have an idea for a feature, or want to fix a typo, open a pull request.

If you are not sure of your changes or need help finishing them, open a pull request anyway. I'll try to help!

License

Vnu is released under the MIT License. See the LICENSE file for further details.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory