Update maintenance badge
[suppress-warnings.git] / README.asciidoc
blob1427c9de73f846ab2865a1f2ae78b3720a60fa28
1 = Suppress-Warnings image:https://img.shields.io/badge/email-%40metio-brightgreen.svg?style=social&label=mail["Discuss on Google Groups", link="https://groups.google.com/forum/#!forum/metio"] image:https://img.shields.io/badge/irc-%23metio.wtf-brightgreen.svg?style=social&label=IRC["Chat on IRC", link="http://webchat.freenode.net/?channels=metio.wtf"]
2 Sebastian Hoß <http://seb.xn--ho-hia.de/[@sebhoss]>
3 :github-org: sebhoss
4 :project-name: suppress-warnings
5 :project-group: de.xn--ho-hia.quality
6 :coverity-project: 9346
7 :codacy-project: a6b59a4e42104e6492cb46961b195e5e
9 image:https://img.shields.io/badge/license-cc%20zero-000000.svg?style=flat-square["CC Zero", link="http://creativecommons.org/publicdomain/zero/1.0/"]
10 pass:[<span class="image"><a class="image" href="https://maven-badges.herokuapp.com/maven-central/de.xn--ho-hia.quality/suppress-warnings"><img src="https://img.shields.io/maven-central/v/de.xn--ho-hia.quality/suppress-warnings.svg?style=flat-square" alt="Maven Central"></a></span>]
11 pass:[<span class="image"><a class="image" href="https://www.javadoc.io/doc/de.xn--ho-hia.quality/suppress-warnings"><img src="https://www.javadoc.io/badge/de.xn--ho-hia.quality/suppress-warnings.svg?style=flat-square&color=blue" alt="Read JavaDocs"></a></span>]
12 image:https://reposs.herokuapp.com/?path={github-org}/{project-name}&style=flat-square["Repository size"]
13 image:https://www.openhub.net/p/{project-name}/widgets/project_thin_badge.gif["Open Hub statistics", link="https://www.openhub.net/p/{project-name}"]
15 image:https://img.shields.io/travis/{github-org}/{project-name}/master.svg?style=flat-square["Build Status", link="https://travis-ci.org/{github-org}/{project-name}"]
16 image:https://img.shields.io/coverity/scan/{coverity-project}.svg?style=flat-square["Coverity Scan Result", link="https://scan.coverity.com/projects/{github-org}-{project-name}"]
17 image:https://img.shields.io/codacy/grade/{codacy-project}.svg?style=flat-square["Codacy Code Quality", link="https://www.codacy.com/app/mail_7/{project-name}"]
18 image:https://img.shields.io/badge/forkable-yes-brightgreen.svg?style=flat-square["Can this project be forked?", link="https://basicallydan.github.io/forkability/?u={github-org}&r={project-name}"]
19 image:https://img.shields.io/maintenance/yes/2017.svg?style=flat-square["Is this thing still maintained?"]
20 image:https://img.shields.io/bountysource/team/metio/activity.svg?style=flat-square["Bounties on open tickets", link="https://www.bountysource.com/teams/metio"]
22 Java utility library which contains constants for `@SuppressWarnings` annotations.
24 == Usage
26 Use the `CompilerWarnings` class to suppress compiler warnings like this:
28 [source, java]
29 ----
30 @SuppressWarnings(CompilerWarnings.NLS)
31 final String myText = "hello world!";
32 ----
34 Add `de.xn__ho_hia.quality.suppression.CompilerWarnings.*` as a favorite to your IDE, e.g. use `Java > Editor > Content Assist > Favorites` in Eclipse. This allows will instruct Eclipse to auto import the constant you specified statically which reduces the code to this:
36 [source, java]
37 ----
38 @SuppressWarnings(NLS)
39 final String myText = "hello world!";
40 ----
42 Take a look at the pass:[<a href="http://www.javadoc.io/doc/de.xn--ho-hia.quality/suppress-warnings/">JavaDoc</a>] to see a list of all available constants. All of them contain a (short) description which should help out developers who have not seen those suppressions before. Referencing those constants instead of using plain strings will make sure that all suppressions are correct.
44 === Integration
46 To use this project just declare the following dependency inside your POM:
48 [source, xml, subs="attributes,verbatim"]
49 ----
50 <dependency>
51   <groupId>{project-group}</groupId>
52   <artifactId>{project-name}</artifactId>
53   <version>${version.suppress-warnings}</version>
54 </dependency
55 ----
57 Replace `${version.suppress-warnings}` with the pass:[<a href="http://search.maven.org/#search%7Cga%7C1%7Cg%3Ade.xn--ho-hia.quality%20a%3Asuppress-warnings">latest release</a>]. This project follows the http://semver.org/[semantic versioning] guidelines.
60 === Compatibility
62 This project is compatible with the following Java versions:
64 .Java compatibility
65 |===
66 | | 4.X.Y
68 | Java 8
69 | ✓
70 |===
73 == License
75 To the extent possible under law, the author(s) have dedicated all copyright
76 and related and neighboring rights to this software to the public domain
77 worldwide. This software is distributed without any warranty.
79 You should have received a copy of the CC0 Public Domain Dedication along
80 with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.
82 == Mirrors
84 * https://github.com/sebhoss/suppress-warnings
85 * https://bitbucket.org/sebhoss/suppress-warnings
86 * https://gitlab.com/sebastian.hoss/suppress-warnings
87 * http://v2.pikacode.com/sebhoss/suppress-warnings
88 * http://repo.or.cz/suppress-warnings.git