Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Yew lints opt-in #2882

Merged
merged 5 commits into from Sep 25, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main-checks.yml
Expand Up @@ -216,7 +216,7 @@ jobs:
- name: Run tests
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg nightly_yew
RUSTFLAGS: --cfg nightly_yew --cfg yew_lints
with:
command: test
args: -p yew-macro test_html_lints --features lints
3 changes: 3 additions & 0 deletions packages/yew-macro/src/html_tree/lint/mod.rs
Expand Up @@ -26,6 +26,9 @@ pub fn lint<L>(tree: &HtmlTree)
where
L: Lint,
{
#[cfg(not(yew_lints))]
let _ = tree;
#[cfg(yew_lints)]
match tree {
HtmlTree::List(list) => {
for child in &list.children.0 {
Expand Down