Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.6 KB

CONTRIBUTING.md

File metadata and controls

37 lines (25 loc) · 1.6 KB

Contributing

Contributions are welcome!

How to contribute

When you wish to contribute, please open an issue. Even a question can be a helpful contribution, as it can identify incomplete or missing parts in the documentation.

Other things, such as bug reports, pull requests, etc. are also welcome.

Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub.

The short version:

  1. Fork the repository
  2. Make your changes in your fork (using a new branch is advisable)
  3. Test your changes, and verify any UI changes visually. A complete starting point is ./gradlew test runPLugin
  4. Open a PR to merge your changes in the target repo

Development Notes

The folder src/main/gen contains code generated by the IntelliJ GrammarKit plugin. It is not generated during the build, because the GrammarKit Gradle plugin does not support mixins or injecting PSI utility methods. Code generation is therefore a manual operation.

When changing the grammar, keep in mind:

  • Don't change the lexer directly, but change the tokens definition in the grammar instead
  • When changing tokens, remember to recreate the lexer
  • When renaming/deleting BNF clauses, remember to delete the folder src/main/gen/opwvhk/intellij/avro_idl/psi
  • Always regenerate the code after changing the grammar and/or lexer

There are no automated tests as hooking into IntelliJ and the effects of navigating its API are by far the trickiest bit. The code doing stuff with the result is trivial.