mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
CI: fail on Slint warnings when building examples
This commit is contained in:
parent
0506042f52
commit
c527cc1461
2 changed files with 4 additions and 1 deletions
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
|
@ -16,6 +16,7 @@ concurrency:
|
|||
|
||||
env:
|
||||
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
||||
SLINT_COMPILER_DENY_WARNINGS: 1
|
||||
|
||||
jobs:
|
||||
files-changed:
|
||||
|
|
|
@ -484,7 +484,9 @@ pub fn compile_with_output_path(
|
|||
let (doc, diag, loader) =
|
||||
spin_on::spin_on(i_slint_compiler::compile_syntax_node(syntax_node, diag, compiler_config));
|
||||
|
||||
if diag.has_errors() {
|
||||
if diag.has_errors()
|
||||
|| (!diag.is_empty() && std::env::var("SLINT_COMPILER_DENY_WARNINGS").is_ok())
|
||||
{
|
||||
let vec = diag.to_string_vec();
|
||||
diag.print();
|
||||
return Err(CompileError::CompileError(vec));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue