This is the Capstone Project for the Ruby module of the Microverse program. The main goal of this project is to put into practice the concepts of Methods, Classes, Modules, and Testing. in Ruby.
As its name suggests, the HTML-linter enforces some basic HTML5 rules and good practices recommended by w3school article HTML Style Guide and Coding Conventions.
- The document should contain the tags
<!DOCTYPE> <html> <head> <body> <title>
. Attributes are optional. The lint match only if the tag is at the start of a line or after whitespaces.
Good
<!DOCTYPE html>
<html lang="en">
Bad
<!DOCTYPE html><html lang="en">
- All tags and attributes must be in lowercase, except !DOCTYPE
Good
<html lang="en">
Bad
<Html LANG="en">
- Tag exists and is a valid HTML5 tag
Good
<section>
Bad
<sections>
- No whitespace between an attribute and its value if any
Good
<link rel="stylesheet" href="styles.css" />
Bad
<link rel= "stylesheet" href = "styles.css" />
- Ruby 1.9
- Install the Ruby Gem Colorize
- Clone this repository on your computer. Check this tutorial about cloning a GitHub repository
- Change the current working directory to the location where the respository was cloned.
- Select
/html-Linter/bin
as the working directory.
Run the HTML-linter typing ruby main *path of your HTML file*
in the terminal, press Enter. /html-Linter/bin
must be the working directory
If your file does not comply with linter rules, the result will be something like this:
If there are no errors analysis complete: 0 issues found
message will appear
- Select
/html-Linter/testing
as the working directory. - Run the command
bundle exec rspec
in the terminal.
👤 John Arboleda
- Github: John-Arboleda
- Twitter: John_J_Arboleda
- Linkedin: john-jairo-arboleda-castillo
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.