Atata.Cli.HtmlValidate is a C#/.NET library that provides an API for html-validate npm package.
The package targets .NET 8.0 and .NET Framework 4.6.2.
Provides C#/.NET API for html-validate CLI. Check out https://html-validate.org documentation for more info.
Install Atata.Cli.HtmlValidate NuGet package.
-
Package Manager:
Install-Package Atata.Cli.HtmlValidate -
.NET CLI:
dotnet add package Atata.Cli.HtmlValidate
Requires html-validate npm package to be installed.
- Using npm command:
npm install -g html-validate - Using Atata.Cli.Npm .NET library:
new NpmCli() .InstallIfMissing(HtmlValidateCli.Name, global: true);
- Using its own
HtmlValidateCliclass:new HtmlValidateCli() .RequireVersion("5.1.1");
The main class is HtmlValidateCli located in Atata.Cli.HtmlValidate namespace.
HtmlValidateResult result1 = HtmlValidateCli.InDirectory("some/dir")
.Validate("testme.html");var options = new HtmlValidateOptions
{
Config = "someconfig.json",
Formatter = HtmlValidateFormatter.Codeframe("output.txt")
};
HtmlValidateResult result3 = HtmlValidateCli.InDirectory("some/dir")
.Validate("testme.html", options);HtmlValidateResult result2 = await HtmlValidateCli.InDirectory("some/dir")
.ValidateAsync("testme.html");HtmlValidateFormatter? Formatter { get; set; }
Gets or sets the formatter.int? MaxWarnings { get; set; }
Gets or sets the maximum allowed warnings count. The default value isnull, which means that warnings are allowed. Use0to disallow warnings.string? Config { get; set; }
Gets or sets the configuration file path (full or relative to CLIWorkingDirectory).string[] Extensions { get; set; }
Gets or sets the file extensions to use when searching for files in directories. For example:"html","vue", etc.
bool IsSuccessful { get; }
Gets a value indicating whether this result is successful.string Output { get; }
Gets the text output of result.
- Slack: https://atata-framework.slack.com
- X: https://x.com/AtataFramework
- Stack Overflow: https://stackoverflow.com/questions/tagged/atata
Any feedback, issues and feature requests are welcome.
If you faced an issue please report it to Atata.Cli.HtmlValidate Issues, ask a question on Stack Overflow using atata tag or use another Atata Contact way.
Contact me, Yevhenii Shunevych, if you need help with test automation using the Atata Framework. You can hire me for test automation development or consulting if you are looking for a high-quality, maintainable automation solution for your project.
- LinkedIn: https://www.linkedin.com/in/yevgeniy-shunevych
- Email: yevgeniy.shunevych@gmail.com
- Consulting: https://atata.io/consulting/
Many thanks to the sponsors that regularly support the development of Atata Framework through donations:
If Atata Framework is useful to you or your company, consider supporting the framework development with a donation.
Check out Contributing Guidelines for details.
Atata Framework follows Semantic Versioning 2.0. Thus backward compatibility is followed and updates within the same major version (e.g. from 1.3 to 1.4) should not require code changes.
Atata is an open source software, licensed under the Apache License 2.0. See LICENSE for details.