Skip to content

StevenLooman/magik-tools

Repository files navigation

Magik-tools

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.

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.

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.

About

Magik Language Server, Linter, and SonarQube plugin

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages