{"id":17037024,"url":"https://github.com/perryvw/dznlint","last_synced_at":"2025-07-24T15:37:45.408Z","repository":{"id":57217980,"uuid":"448555655","full_name":"Perryvw/dznlint","owner":"Perryvw","description":"A linter for the Dezyne language.","archived":false,"fork":false,"pushed_at":"2025-04-11T08:07:11.000Z","size":2261,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T10:25:30.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Perryvw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-16T13:01:54.000Z","updated_at":"2025-03-14T20:37:44.000Z","dependencies_parsed_at":"2024-01-29T21:52:49.634Z","dependency_job_id":"b1a360f3-b176-43d5-ae1f-a06e9d2cd528","html_url":"https://github.com/Perryvw/dznlint","commit_stats":{"total_commits":89,"total_committers":2,"mean_commits":44.5,"dds":0.0337078651685393,"last_synced_commit":"f7759a5b6e75368de75f172180621614a06c41ab"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perryvw%2Fdznlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perryvw%2Fdznlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perryvw%2Fdznlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perryvw%2Fdznlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Perryvw","download_url":"https://codeload.github.com/Perryvw/dznlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571836,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:52:42.437Z","updated_at":"2025-07-24T15:37:45.388Z","avatar_url":"https://github.com/Perryvw.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/Perryvw/dznlint/actions/workflows/ci.yml/badge.svg)](https://github.com/Perryvw/dznlint/actions/workflows/ci.yml)\n\n# dznlint\n\nA linter helping you write correct and consistent [Dezyne](https://dezyne.org/) code.\n\nRequires Node.js to run.\n\nBuilt on top of the [tree-sitter-dezyne](https://github.com/j0ran/tree-sitter-dezyne) parser.\n\n## Installation\n\n```bash\n$ npm install -D dznlint\n```\n\n## Usage\n\n```bash\nnpx dznlint \u003coptions\u003e [...files]\n```\n\nFor help on the different options, see:\n\n```bash\nnpx dznlint --help\n```\n\n## Configuration\n\nBy default, `dznlint` will look for the file `dznlint.config.json` in its working directory. You can also specify which config file to use by providing the `--config-file` CLI argument. This json file should contain a subset of [the available configuration values](./src/config/dznlint-configuration.ts).\n\nFor example:\n\n```json\n{\n    \"implicit_illegal\": \"warning\", // Do not allow explicit illegals\n    \"naming_convention\": {\n        \"component\": \"[A-Z][a-zA-Z0-9]*\", // Set naming convention for component\n        \"interface\": \"I[A-Z][a-zA-Z0-9]*\" // Set naming convention for interface\n    },\n    \"no_shadowing\": \"warning\" // Set shadowing rule violations to 'warning' severity\n}\n```\n\n# Available rules:\n\nDefault values are indicated in bold.\n\n## call_arguments_must_match\n\nArguments passed to a function call must match the parameters of that function or event.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## dead_code\n\nNo code allowed after return statements in functions.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## format\n\nDznlint formatting options, will be used when supplying cli with the `--format` or `--f` flag to format files instead of linting.\n\nDefault formatting settings are:\n\n```json\n{\n    \"format\": {\n        \"indent\": [\"spaces\", 4], // [\"spaces\" | \"tabs\", indent width] - indentation\n        \"braces\": \"next-line\", // \"next-line\" | \"same-line\" - where to put opening braces\n        \"indent_components_interfaces\": true, // indent component/interface root\n        \"target_width\": 80 // width of the file after which formatter might insert extra newlines\n    }\n}\n```\n\n---\n\n## implicit_illegal\n\nDo not mark events explicitly illegal. As of Dezyne 2.14, events not mentioned are implicitly assumed to be illegal.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## inline_temporary_variables\n\nTemporary variables that are only referred to once should be inlined.\n\n**Possible values:** \"hint\" | \"warning\" | \"error\"\n\n---\n\n## invariant_must_be_bool\n\nExpressions in invariant statements must evaluate to type `bool`\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## naming_convention\n\nNaming convention for various different variables.\n\n**Default value:**\n\n```json\n{\n    \"component\": \"[A-Z][a-zA-Z0-9]*\",\n    \"enum\": \"[A-Z][a-zA-Z0-9]*\",\n    \"enum_member\": \"[A-Z][a-zA-Z0-9]*\",\n    \"interface\": \"I[A-Z][a-zA-Z0-9]*\",\n    \"local\": \"[a-z_][a-zA-Z0-9]*\",\n    \"type\": \"[A-Z][a-zA-Z0-9]*\"\n}\n```\n\n---\n\n## never_fired_event\n\nIf an `out` event in an interface is never fired it is not useful, and often indicates the programmer forgot something.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## never_legal_event\n\nIf an `in` event in an interface is always illegal it is not useful, and often indicates the programmer forgot something.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## no_bool_out_parameters\n\nOut parameters of type `bool` are not allowed by Dezyne and will lead to a well-formedness error.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_duplicate_parameters\n\nParameters should have distinct names.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_duplicate_port_binding\n\nPorts cannot be bound more than once.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_empty_defer_capture\n\nDefer statements should capture one or more state variables to prevent unexpected verification time explosion due to the defer queue unexpectedly growing.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## no_interface_event_parameters\n\nIn interface behaviors, events should not mention any parameters, this is invalid Dezyne code.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_recursive_system\n\nSystems cannot contain instances of themself.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_shadowing\n\nParameters and variables should not shadow (re-define) variables that already exist in scope.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_unconnected_ports\n\nAll ports in a system should be connected for the system to be valid.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_unknown_imports\n\nImported dzn files should be resolvable by dznlint. This check might fail if the include directories are not properly set. If this check fails other linting rules might also fail, since they rely on type information.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_unknown_variables\n\nAll referenced variables, members and types should be known.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_unknown_port_binding\n\nBindings cannot bind to unknown ports.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## no_unused_instances\n\nDefined instances should be used in at least one binding.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## no_unused_parameters\n\nParameters should be referenced at least once, or escaped by prefixing (or replacing with) `_`.\n\n**Possible values:** \"hint\" | **\"warning\"**| \"error\"\n\n---\n\n## no_unused_ports\n\nPports should be referenced at least once.\n\n**Possible values:** \"hint\" | **\"warning\"**| \"error\"\n\n---\n\n## no_unused_variables\n\nDefined variables should be referenced at least once.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## on_parameters_must_match\n\nParameters in an `on` trigger must match the number of parameters specified by the triggering event.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## parameter_direction\n\nParameter direction (in/out/inout) should always be specified.\n\n**Possible values:** \"hint\" | **\"warning\"** | \"error\"\n\n---\n\n## port_missing_redundant_blocking\n\nAs of Dezyne 2.15, a provided port should be marked blocking if any of its calls is implemented using the `blocking` keyword. On the other hand, if no `blocking` is used in the behavior for this port, it should **not** be marked as blocking.\n\n**Possible values:** \"hint\" | \"warning\" | \"error\" (Default: disabled for backwards compatibility)\n\n---\n\n## port_parameter_direction\n\nFunction parameters that are ports must be annotated with `provides` or `required`. Function parameters that are not ports must **not** be marked with these two.\n\n**Possible values:** \"hint\" | \"warning\" | **\"error\"**\n\n---\n\n## trailing_assignments\n\nWill find trailing assignments used in interfaces. Trailing assignments can have unexpected effects when using using shared state, so it might be useful to be aware of where trailing assignments are used, or to disallow them completely.\n\n**Possible values:** \"hint\" | \"warning\" | \"error\" (default: off)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryvw%2Fdznlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperryvw%2Fdznlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryvw%2Fdznlint/lists"}