Contributions are very welcome!
If you're a new contributor, first you need Fork the repository and clone it on your computer.
Next you need to install the npm dependencies and link the bundle:
npm install
npm link
Now you have an local development install of npm-groovy-lint, you can make changes.
If you have added new features or fixed an issue please make sure that you add tests to validate your changes.
To test your code run:
npm run test
Once your code is ready, documented and tested, run following to ensure your the code is linted and fully built and then submit a pull request.
npm run dev:pre-commit
If you need to test your updates in VsCode Groovy Lint before making your PR
- Fork VsCode Groovy Lint repo and clone it on your computer (with same root as your clone of npm-groovy-lint fork)
- Run
npm run dev:lint-install-local-copy-vscode
to deploy your local updates to VsCode Groovy Lint extension development files - Launch VsCode Groovy Lint debug configuration
Groovy Lint Debug
To update libraries download the new jar files into the correct place:
Once you have the new jars run the following to regenerate the new server jar:
npm run dev:pre-commit
If GitHub Action - Update check reports changes for lib/java/CodeNarcServer.jar make sure you have run:
npm run dev:pre-commit
If this has been run ensure you're running exactly the same version of node as the GitHub Action, as different node versions can impact how zlib compresses the data in the jar file.
To do determine the node version look at the output from the
Check for changes -> Install node
. For example in the following output node
18.18.2
is in use.
Run actions/setup-node@v3
Found in cache @ /opt/hostedtoolcache/node/18.18.2/x64
Environment details
You can use nvm to switch easily between different node versions.