-
Notifications
You must be signed in to change notification settings - Fork 825
Dev guide: Coding and Style Conventions
The coding conventions for JGraphT are specified in etc/eclipse-formatter-settings.xml
; follow the patterns you see in existing source files, but don't worry too much about the details, because we use Eclipse to automatically reformat all of the code as part of each release. Also, be sure to preserve existing authorship attribution, and give due credit to all contributors and external sources. And set your editor to use spaces only, never tabs.
We use checkstyle to enforce a few basic rules such as the existence of proper documentation, no tab characters, etc. The checks are specified in etc/jgrapht_checks.xml
and are executed automatically during continuous integration via Github Actions. To check locally that your contribution adheres to these rules, both commands
mvn checkstyle:check -P checkstyle
and
mvn javadoc:aggregate
should complete with no errors.
- Home
- Adopt a highway
- Demos
- Dev guide
- Become a Contributor
- Coding and Style Conventions
- Contributor Guidelines
- Deprecation policy
- How to add example code
- How to make your first (code) contribution
- How to setup your development environment for JGraphT
- How to write documentation
- Maven Plugin Installation Guide
- Open tasks, projects and collaboration ideas
- Unit testing
- Website Deployment
- Writing new wiki pages
- GSoC
- Users