descriptionConstants for @SuppressWarnings annotations
homepage URLhttps://github.com/sebhoss/suppress-warnings
repository URLhttps://github.com/sebhoss/suppress-warnings.git
ownerrepoorcz@shoss.de
last changeSun, 8 Jan 2017 17:35:54 +0000 (8 18:35 +0100)
last refreshWed, 8 May 2024 01:27:35 +0000 (8 03:27 +0200)
content tags
add:
README.asciidoc
= 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"]
Sebastian Hoß <http://seb.xn--ho-hia.de/[@sebhoss]>
:github-org: sebhoss
:project-name: suppress-warnings
:project-group: de.xn--ho-hia.quality
:coverity-project: 9346
:codacy-project: a6b59a4e42104e6492cb46961b195e5e

image:https://img.shields.io/badge/license-cc%20zero-000000.svg?style=flat-square["CC Zero", link="http://creativecommons.org/publicdomain/zero/1.0/"]
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>]
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>]
image:https://reposs.herokuapp.com/?path={github-org}/{project-name}&style=flat-square["Repository size"]
image:https://www.openhub.net/p/{project-name}/widgets/project_thin_badge.gif["Open Hub statistics", link="https://www.openhub.net/p/{project-name}"]

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}"]
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}"]
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}"]
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}"]
image:https://img.shields.io/maintenance/yes/2017.svg?style=flat-square["Is this thing still maintained?"]
image:https://img.shields.io/bountysource/team/metio/activity.svg?style=flat-square["Bounties on open tickets", link="https://www.bountysource.com/teams/metio"]

Java utility library which contains constants for `@SuppressWarnings` annotations.

== Usage

Use the `CompilerWarnings` class to suppress compiler warnings like this:

[source, java]
----
@SuppressWarnings(CompilerWarnings.NLS)
final String myText = "hello world!";
----

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:

[source, java]
----
@SuppressWarnings(NLS)
final String myText = "hello world!";
----

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.

=== Integration

To use this project just declare the following dependency inside your POM:

[source, xml, subs="attributes,verbatim"]
----
<dependency>
  <groupId>{project-group}</groupId>
  <artifactId>{project-name}</artifactId>
  <version>${version.suppress-warnings}</version>
</dependency
----

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.


=== Compatibility

This project is compatible with the following Java versions:

.Java compatibility
|===
| | 4.X.Y

| Java 8
| ✓
|===


== License

To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication along
with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.

== Mirrors

* https://github.com/sebhoss/suppress-warnings
* https://bitbucket.org/sebhoss/suppress-warnings
* https://gitlab.com/sebastian.hoss/suppress-warnings
* http://v2.pikacode.com/sebhoss/suppress-warnings
* http://repo.or.cz/suppress-warnings.git
shortlog
2017-01-08 Sebastian HoßUpdate maintenance badgemaster
2017-01-08 Sebastian Hoßfix update-maintenance-badge goal
2017-01-08 Sebastian Hoßignore ansible markers
2016-07-09 Sebastian Hoßupdate makefile
2016-07-09 Sebastian HoßMerge branch 'master' of git@github:sebhoss/suppress...
2016-07-09 Sebastian Hoßconvert markdown -> asciidoc
2016-07-09 Sebastian Hoßadd pikacode mirror
2016-07-07 Sebastian Hoßfix coverity scan on travis
2016-07-04 Sebastian Hoßfix coverity badge
2016-07-04 Sebastian Hoßupdate badges
2016-07-04 Sebastian Hoßupdate travis build config
2016-07-04 Sebastian Hoßadd changelog, coc & contributing
2016-07-01 Sebastian Hoßmake license badge flat
2016-06-19 Sebastian Hoßadd mirrors
2016-06-19 Sebastian Hoßpoint to correct groupd id
2016-06-19 Sebastian Hoßfix weird formatting?
...
tags
7 years ago suppress-warnings-4.0.0-20160619211629 [maven-scm] copy for tag suppress...
7 years ago suppress-warnings- [maven-scm] copy for tag suppress...
8 years ago suppress-warnings-3.0.0 [maven-release-plugin] copy for...
9 years ago suppress-warnings-2.0.0 [maven-release-plugin] copy for...
10 years ago suppress-warnings-1.0.0 [maven-release-plugin] copy for...
heads
7 years ago master
8 years ago gh-pages