Magik-tools
May 18, 2026 ยท View on GitHub
Magik-tools is a collection of tools for the Magik programming language used by the Smallworld 5 platform. It provides the following tools:
- Language server
- Debug adapter
- Linter
- Typing linter
- SonarQube plugin
By no means is this product fully tested and production-ready. Use at your own risk, your mileage may vary.
Components
This project consists of several components.
SonarQube plugin
Installation
After building, the artifact/jar will be created at sonar-magik-plugin/target/sonar-magik-plugin-<version>.jar.
Copy the plugin (sonar-magik-plugin-<version>.jar) to your sonarqube/extensions/plugins directory. (Re)start Sonar to activate the plugin.
Pre-built artifacts/jars can be found at magik-tools/releases.
Analyzing projects
Use sonar-scanner to analyze your projects. An example configuration, stored in sonar-project.properties, would be:
sonar.projectKey=test:test_project
sonar.projectName=Test project
sonar.sources=modules/
sonar.language=magik
sonar.coverageReportPaths=coverage.xml
Magik Linter
A linter for Magik is available in the magik-lint directory. See magik-lint/README.md for more information.
Magik Typed Linter
A typing checker/linter for Magik is available in the magik-typed-lint directory. See magik-typed-lint/README.md for more information.
Language server
A language server for Magik is available in the magik-language-server directory. See magik-language-server/README.md for more information.
Debug adapter
A debug adapter for Smallworld 5/Magik is available in the magik-debug-adapter directory. See magik-debug-adapter/README.md for more information.
Development
Building
You can build the plugin using maven, like so:
$ mvn clean verify test package
[INFO] Scanning for projects...
...
Building without running tests:
$ mvn -Dmaven.test.skip=true clean verify test package
[INFO] Scanning for projects...
...
Auto-formatting of Java sources:
$ mvn spotless:apply
[INFO] Scanning for projects...
...
Unit tests
You can run the unit tests using maven, like so:
$ mvn clean test
[INFO] Scanning for projects...
...
Results will be shown on the console.
Changes
Changes are recorded using Towncier. Once a new release is created, towncrier is used to write the changelog to CHANGES.md.
To create a new changelog entry run:
$ towncrier create -c "You description here, in Markdown" <pr-number>.<change type>.md
...
A change type can be one of:
feature: Signifying a new feature.bugfix: Signifying a bug fix.doc: Signifying a documentation improvement.removal: Signifying a deprecation or removal of public API.misc: A ticket has been closed, but it is not of interest to users.
Do not add Markdown headings to Towncrier fragments.
When a breaking change is introduced, start the fragment text with plain text such as:
Breaking change: `load_list.txt` and `patch_list.txt` files are now checked as well.
If multiple breaking changes are listed in a single fragment, use plain text followed by a list:
Breaking changes:
- Renamed `foo` to `bar`.
- Removed support for `baz`.
A new file is then created in the changes directory. Add a short description of the change to that file.
Releasing
Call the script at .github/scripts/release.sh, with the new version as the argument. For example:
$ .github/scripts/release.sh 0.12.0
...
This will set the versions for all relevant components, commit the changes and tag it. No push is being done.
To continue development, append -SNAPSHOT to the version. E.g., 0.12.0-SNAPSHOT.
Updating (maven)
Dependabot is used to keep versions up to date.
In case versions have to be updated manually, run the following to check if there are any new versions of maven-dependencies available:
$ mvn versions:display-dependency-updates
...
SonarCloud
This project can found at SonarCloud.
Contributing
See CONTRIBUTING.md for instruction on how to contribute.
License
This project is licensed under GPLv3, see LICENSE.md.
Commercial use
Commercial use is allowed. By no means is this product fully tested. Use at your own risk, your mileage may vary.
If you do use this - commercially or not - please do inform me.