From 4b2dbb0a06285d7b6f913b2bd738266639be082f Mon Sep 17 00:00:00 2001 From: Willie Scholtz Date: Wed, 15 Jan 2025 13:12:23 +0100 Subject: [PATCH] docs: Move formatting section to CONTRIBUTING.md, add Sonar build badge --- CONTRIBUTING.md | 10 +++++++++- README.md | 8 ++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bfabee145e7..17681d38c30 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,13 +12,21 @@ Please use [the mailing list](https://groups.google.com/group/mybatis-user) inst - It is a good idea to discuss your changes on [the mailing list](https://groups.google.com/group/mybatis-user) to get feedback from the community. - If you have a patch with unit tests, send a pull request. Please see the [Contributing code](CONTRIBUTING.md#contributing-code) section. - ## Improving documentation - Documentations are placed under [src/site](https://github.com/mybatis/mybatis-3/tree/master/src/site) directory in [the xdoc format](https://maven.apache.org/doxia/references/xdoc-format.html), so it is basically the same as creating a patch to contribute documentation changes. Please see the [Contributing code](CONTRIBUTING.md#contributing-code) section. ## Contributing code +### Formatting + +Mybatis-core is now being auto formatted. Given nature of some code logic with mybatis, it is more appropriate to force a formatting structure manually for snippets such as sql statements. To do so, add following blocks around code. + +- ```// @formatter:off``` to start the block of unformatted code +- ```// @formatter:on``` to end the block of unformatted code + +If comment sections need same behaviour such as javadocs, note that the entire block must be around entire comment as direct usage does not properly indicate that formatter treats it all as one comment block regardless. + ### Copyright and License - You are the author of your contributions and will always be. diff --git a/README.md b/README.md index fec42f44401..7a90b6d465c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ MyBatis SQL Mapper Framework for Java [![build](https://github.com/mybatis/mybatis-3/actions/workflows/ci.yaml/badge.svg)](https://github.com/mybatis/mybatis-3/actions?query=workflow%3A%22Java+CI%22) [![Coverage Status](https://coveralls.io/repos/mybatis/mybatis-3/badge.svg?branch=master&service=github)](https://coveralls.io/github/mybatis/mybatis-3?branch=master) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mybatis_mybatis-3&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=mybatis_mybatis-3) [![Maven central](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.mybatis/mybatis) [![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/https/oss.sonatype.org/org.mybatis/mybatis.svg)](https://oss.sonatype.org/content/repositories/snapshots/org/mybatis/mybatis/) [![License](https://img.shields.io/:license-apache-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) @@ -25,12 +26,7 @@ Essentials Contributions ------------- -Mybatis-core is now being auto formatted. Given nature of some code logic with mybatis, it is more appropriate to force a formatting structure manually for snippets such as sql statements. To do so, add following blocks around code. - -- ```// @formatter:off``` to start the block of unformatted code -- ```// @formatter:on``` to end the block of unformatted code - -If comment sections need same behaviour such as javadocs, note that the entire block must be around entire comment as direct usage does not properly indicate that formatter treats it all as one comment block regardless. +See [here](CONTRIBUTING.md) Tests -----