Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ fn ui_cargo_toml_metadata() {
struct Renderer<'a> {
count: usize,
lints: &'a Vec<LintMetadata>,
git_ref: String,
}

impl Renderer<'_> {
Expand Down Expand Up @@ -522,6 +523,7 @@ impl DiagnosticCollector {
Renderer {
count: LINTS.len(),
lints: &metadata,
git_ref: env::var("TAG_NAME").unwrap_or("master".to_string()),
}
.render()
.unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion util/gh-pages/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h2 class="lint-title"> {# #}

{# Jump to source #}
{% if let Some(id_location) = lint.id_location %}
<a href="https://github.com/rust-lang/rust-clippy/blob/master/{{id_location}}">View Source</a>
<a href="https://github.com/rust-lang/rust-clippy/blob/{{git_ref}}/{{id_location}}">View Source</a>
{% endif %}
</div> {# #}
</div> {# #}
Expand Down
Loading