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.
This project consists of several components.
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.
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.xmlA linter for Magik is available in the magik-lint directory. See magik-lint/README.md for more information.
A typing checker/linter for Magik is available in the magik-typed-lint directory. See magik-typed-lint/README.md for more information.
A language server for Magik is available in the magik-language-server directory. See magik-language-server/README.md for more information.
A debug adapter for Smallworld 5/Magik is available in the magik-debug-adapter directory. See magik-debug-adapter/README.md for more information.
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...
...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 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.
Please add the following fragment before the changelog entry when a breaking change is introduced:
**Breaking change**A new file is then created in the changes directory. Add a short description of the change to that file.
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.
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
...This project can found at SonarCloud.
See CONTRIBUTING.md for instruction on how to contribute.
This project is licensed under GPLv3, see LICENSE.md.
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.