perryvw / dznlint Goto Github PK
View Code? Open in Web Editor NEWA linter for the Dezyne language.
License: MIT License
A linter for the Dezyne language.
License: MIT License
There is a lookup issue when referencing own namespace:
namespace NS {
extern Error = $$;
interface I {
in void GetError(out NS.Error error);
}
}
Results in: Cannot find NS.Error
It seems there is also a problem merging namespaces from multiple imports:
import A; //-> namespace NS { extern C $$; }
import B; //-> namespace NS { extern D $$; }
NS.C //--> not found
NS.D //--> only found last one
Results in NS.C not found
but NS.D is found.
Some additional test scenarios:
import other.dzn; -> namespace NS { interface B{} }
namespace NS {
component A {
provides B report;
}
}
and
namespace A {
extern ET = $$;
}
namespace B {
interface I {
out void Foo(A.ET v);
}
}
void foo() {
return Result.Bla; // <--- Expected diagnostic but got nothing
}
Looking up state variables on interfaces causes errors ie in a component guard
[api.state.bla]
gives an issue because state is defined in the behavior of the interface, which is not considered.
Assigning a component to the locator with <=> *
is currently marked as duplicate binding of port * while it should not be.
If a port has not uses in a component it can provide a warning that it is not used and can be removed.
Expecting a diagnostic here:
interface {
behavior {
on inevitable:
{
Unknown;
}
}
}
But no diagnostic is currently generated
Having a multiline comment starting with /*
followed immediately by a newline causes the parser to fail and report invalid syntax, while it is of course valid.
interface I { in void foo(in bool bla); }
component C {
provides I api;
behavior {
on api.foo(): { // <--- expecting diagnostic here
}
}
}
Example:
if (a) return b;
else if (c) return d;
else illegal;
This is a valid Dezyne if
, but dznlint fails to parse it correctly.
Expecting the following (pseudo-) code to result in an error diagnostic, but no error is found:
component {
behavior {
void Bla() {
if (foo) { // <----- foo is not defined and should be an error
}
}
}
Statements of the following kind are not properly parsed:
on X: [guard] Y;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.