lukasz-antoniak commented on code in PR #2041: URL: https://github.com/apache/cassandra-java-driver/pull/2041#discussion_r2435417249
########## CONTRIBUTING.md: ########## @@ -17,518 +17,192 @@ specific language governing permissions and limitations under the License. --> -# Contributing guidelines +# Contributing Guidelines -## Code formatting +Thank you for your interest in contributing to the Apache Cassandra Java Driver! Please review the following guidelines to help you get started. -### Java +## Table of Contents -We follow the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html). See -https://github.com/google/google-java-format for IDE plugins. The rules are not configurable. +- [Bugs, Features, and Questions](#bugs-features-and-questions) +- [Development Environment Setup](#development-environment-setup) +- [To Submit a Pull Request](#to-submit-a-pull-request) +- [Coding Guide](#coding-guide) -The build will fail if the code is not formatted. To format all files from the command line, run: - -``` -mvn fmt:format -``` +## Bugs, Features, and Questions -Some aspects are not covered by the formatter: braces must be used with `if`, `else`, `for`, `do` -and `while` statements, even when the body is empty or contains only a single statement. +- To report bugs or request features, please file a ticket on our [JIRA](https://issues.apache.org/jira/projects/CASSJAVA). +- For questions, use our [user mailing list](https://groups.google.com/a/lists.datastax.com/g/java-driver-user). -### XML +## Development Environment Setup -The build will fail if XML files are not formatted correctly. Run the following command before you -commit: +### Build and IDE Configuration -```java -mvn xml-format:xml-format -``` +- Ensure Maven is installed and you are using Java 8. +- Build the project with: + ``` + mvn clean package -DskipTests + ``` +- If using an IDE like IntelliJ and encountering issues with guava-shaded classes: + - Run: + ``` + mvn clean install -DskipTests + ``` + - If IntelliJ uses a different Maven version, use the Maven window in IntelliJ: under `Lifecycle`, click `clean` and then `install`. -The formatter does not enforce a maximum line length, but please try to keep it below 100 characters -to keep files readable across all mediums (IDE, terminal, Github...). +### Running the Tests -### Other text files (markdown, etc) +#### Unit Tests -Similarly, enforce a right margin of 100 characters in those files. Editors and IDEs generally have -a way to configure this (for IDEA, install the "Wrap to column" plugin). +- Ensure you are using Java 8. +- Run: + ``` + mvn clean install -DskipTests + mvn test + ``` -## Coding style -- production code +#### Integration Tests + +1. Install Cassandra Cluster Manager (CCM) following its [README](https://github.com/apache/cassandra-ccm). +2. On macOS, enable loopback aliases: Review Comment: Maybe explicitly mention `On MacOS only, ...` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

