Fixed diagnostics files uri handling, added low-level tests

This commit is contained in:
Michael Panchenko authored and Dominik Jain committed 2026-04-29 23:52:26 +02:00
1 parent d198d67a9f
commit bd7e64e85a
91 files changed
+958 -72

No files matched your search

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
if then
echo "$missingGreeting"
fi
@@ -0,0 +1,5 @@
def broken_factory : String
missingGreeting
end
broken_consumer = missingConsumerValue
@@ -0,0 +1,3 @@
String brokenFactory() {
return 'broken'
}
@@ -0,0 +1,10 @@
defmodule DiagnosticsSample do
def broken_factory do
missing_greeting
end
def broken_consumer do
value = broken_factory()
{value, missing_consumer_value}
end
end
@@ -0,0 +1,5 @@
module DiagnosticsSample exposing (brokenFactory)
brokenFactory : String
brokenFactory =
"unterminated
@@ -0,0 +1,5 @@
-module(diagnostics_sample).
-export([broken_factory/0, broken_consumer/0]).
broken_factory() -> MissingGreeting.
broken_consumer() -> MissingConsumerValue.
@@ -0,0 +1,5 @@
program diagnostics_sample
implicit none
integer :: duplicated_value
real :: duplicated_value
end program diagnostics_sample
@@ -0,0 +1,13 @@
package com.example
class DiagnosticsSample {
static String brokenFactory() {
missingGreeting
}
static void brokenConsumer() {
def value = brokenFactory()
println(value)
println(missingConsumerValue)
}
}
@@ -0,0 +1,7 @@
module DiagnosticsSample where
brokenFactory :: String
brokenFactory = missingGreeting
brokenConsumer :: String
brokenConsumer = missingConsumerValue
@@ -0,0 +1,10 @@
class DiagnosticsSample {
static function brokenFactory():String {
return missingGreeting;
}
static function brokenConsumer():Void {
trace(brokenFactory());
trace(missingConsumerValue);
}
}
@@ -0,0 +1,3 @@
float4 main() : SV_Target {
return missingGreeting;
}
@@ -0,0 +1,4 @@
{
"name": "diagnostics",
"value":
}
@@ -0,0 +1,3 @@
function broken_factory(
value = 1
end
@@ -1,6 +1 @@
def brokenFactory : Nat :=
missingGreeting
def brokenConsumer : Nat :=
let value := brokenFactory
value + missingConsumerValue
@@ -0,0 +1,3 @@
function value = diagnostics_sample()
value = missingGreeting;
end
@@ -0,0 +1,4 @@
{
greeting = missingGreeting;
consumer = missingConsumerValue;
}
@@ -0,0 +1 @@
let broken_factory (
@@ -1,3 +1,4 @@
(library
(public_name test_repo)
(name test_repo))
(name test_repo)
(modules test_repo))
@@ -0,0 +1,4 @@
program DiagnosticsSample;
begin
writeln(
end.
@@ -0,0 +1,5 @@
use strict;
use warnings;
print $missingGreeting;
print $missingConsumerValue;
@@ -1,9 +1,4 @@
function Invoke-BrokenFactory {
Invoke-MissingGreeting
}
function Invoke-BrokenConsumer {
$value = Invoke-BrokenFactory
Write-Output $value
Invoke-MissingConsumerValue
if ($true) {
Write-Output "broken"
}
@@ -0,0 +1,9 @@
package com.example
object DiagnosticsSample {
def brokenFactory(): String = missingGreeting
def brokenConsumer(): Unit = {
println(brokenFactory())
println(missingConsumerValue)
}
}
@@ -0,0 +1,7 @@
pragma solidity ^0.8.0;
contract DiagnosticsSample {
function brokenFactory() pure returns (string memory) {
return "broken";
}
}
@@ -11,6 +11,7 @@ let package = Package(
targets: [
.target(
name: "test_repo",
dependencies: []),
dependencies: [],
path: "src"),
]
)
)
@@ -0,0 +1,3 @@
func brokenFactory() -> String {
return
}
@@ -0,0 +1,5 @@
module diagnostics_sample;
initial begin
if (
end
endmodule
@@ -0,0 +1,4 @@
resource "aws_instance" "broken" {
ami =
instance_type = "t2.micro"
}
@@ -0,0 +1,2 @@
[diagnostics]
value =
@@ -0,0 +1,3 @@
<script setup lang="ts">
const value: string =
</script>
@@ -0,0 +1,5 @@
name: diagnostics
value:
- good
-
broken: [
+1 -1
View File
@@ -28,4 +28,4 @@ pub fn build(b: *std.Build) void {
const run_lib_tests = b.addRunArtifact(lib_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_lib_tests.step);
}
}
@@ -0,0 +1,3 @@
pub fn brokenFactory() void {
const value =
}
@@ -29,4 +29,4 @@ pub fn main() !void {
pub fn greeting(name: []const u8) []const u8 {
return std.fmt.allocPrint(std.heap.page_allocator, "Hello, {s}!", .{name}) catch "Hello!";
}
}