Skip to content

Commit

Permalink
Renamed the "Diagnostics Index" to "Error Code Index"
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-F-Bryan committed May 10, 2024
1 parent cfa1d30 commit c90addb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Continuous Integration](https://github.com/Michael-F-Bryan/wit-lsp/actions/workflows/ci.yml/badge.svg)](https://github.com/Michael-F-Bryan/wit-lsp/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/Michael-F-Bryan/wit-lsp/graph/badge.svg?token=0HHP8EX5UY)](https://codecov.io/gh/Michael-F-Bryan/wit-lsp)

([API Docs][api-docs] | [Code Coverage][coverage] | [Error Code Index][diagnostics])
([API Docs][api-docs] | [Code Coverage][coverage] | [Error Code Index][error-codes])

An alternative Language Server implementation for [WIT][wit].

Expand Down Expand Up @@ -63,7 +63,7 @@ do their best to avoid them, and welcome help in analysing and fixing them.

[api-docs]: https://michael-f-bryan.github.io/wit-lsp/crate-docs
[coverage]: https://michael-f-bryan.github.io/wit-lsp/coverage
[diagnostics]: https://michael-f-bryan.github.io/wit-lsp/diagnostics.html
[crev]: https://github.com/crev-dev/cargo-crev
[wit]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
[error-codes]: https://michael-f-bryan.github.io/wit-lsp/error-codes.html
[vscode-wit]: https://github.com/bytecodealliance/vscode-wit
[wit]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
14 changes: 7 additions & 7 deletions crates/xtask/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ fn code_coverage(sh: &Shell) -> color_eyre::Result<()> {
Ok(())
}

fn diagnostics_index() -> color_eyre::Result<String> {
let template = include_str!("diagnostics.html.j2");
fn error_code_index() -> color_eyre::Result<String> {
let template = include_str!("error-codes.html.j2");
let diagnostics_json = include_str!("../../wit-compiler/src/diagnostics/diagnostics.json");
let mut diags: Vec<DiagnosticInfo> = serde_json::from_str(diagnostics_json)?;

Expand Down Expand Up @@ -101,7 +101,7 @@ struct DiagnosticInfo {
enum Target {
Api,
Coverage,
Diagnostics,
ErrorCodes,
Redirects,
}

Expand All @@ -120,10 +120,10 @@ impl Target {
let coverage_dir = project_root.join("target").join("llvm-cov").join("html");
utils::copy_dir(sh, coverage_dir, "coverage")?;
}
Target::Diagnostics => {
tracing::info!("Diagnostics Index");
let diagnostics = diagnostics_index()?;
sh.write_file("diagnostics.html", diagnostics)?;
Target::ErrorCodes => {
tracing::info!("Error Code Index");
let error_codes = error_code_index()?;
sh.write_file("error-codes.html", error_codes)?;
}
Target::Redirects => {
tracing::info!("Creating redirects");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diagnostics Index</title>
<title>Error Code Index</title>
<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -82,7 +82,7 @@
</head>
<body>
<div class="container">
<h1>Diagnostics Index</h1>
<h1>Error Code Index</h1>

<div class="toc">
<h2 class="toc-title">Table of Contents</h2>
Expand Down
Binary file removed integration-tests/.DS_Store
Binary file not shown.

0 comments on commit c90addb

Please sign in to comment.