Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add general coding rules for assertion messages and deprecated APIs #970

Merged
merged 2 commits into from
Dec 27, 2022

Conversation

hankem
Copy link
Member

@hankem hankem commented Oct 3, 2022

This PR adds two more GeneralCodingRules:

  • ASSERTIONS_SHOULD_HAVE_DETAIL_MESSAGE resolves Can ArchUnit check that assertions include a message? #963
  • DEPRECATED_API_SHOULD_NOT_BE_USED checks that no class accesses members (i.e. calls methods or constructors, or accesses fields) that are either @Deprecated themselves or declared in @Deprecated classes, or references @Deprecated class objects.

@hankem hankem force-pushed the extend-general-coding-rules branch from 2e9c591 to d0ee71a Compare October 3, 2022 11:31
@hankem hankem force-pushed the extend-general-coding-rules branch from d0ee71a to 3ea44df Compare November 11, 2022 16:08
@hankem hankem changed the title add general coding rule ASSERTIONS_SHOULD_HAVE_DETAIL_MESSAGE add general coding rules ASSERTIONS_SHOULD_HAVE_DETAIL_MESSAGE & DEPRECATED_API_SHOULD_NOT_BE_USED Nov 11, 2022
@hankem hankem requested a review from codecholeric November 11, 2022 16:46
@hankem hankem force-pushed the extend-general-coding-rules branch from 3ea44df to 97a5a73 Compare November 13, 2022 22:49
@hankem hankem force-pushed the extend-general-coding-rules branch from 97a5a73 to cbef736 Compare November 25, 2022 13:05
@codecholeric codecholeric force-pushed the extend-general-coding-rules branch 2 times, most recently from 6148800 to e1d5a1b Compare December 26, 2022 20:01
@codecholeric codecholeric force-pushed the extend-general-coding-rules branch from e1d5a1b to 3d48c64 Compare December 27, 2022 10:17
Copy link
Collaborator

@codecholeric codecholeric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks a lot!! 🙂 I'm gonna merge it even though the JDK 10 test fails, because as discussed I think this is some problem with the test environment. The same test runs fine on my local Ubuntu machine with the provisioned JDK 😒

@codecholeric codecholeric changed the title add general coding rules ASSERTIONS_SHOULD_HAVE_DETAIL_MESSAGE & DEPRECATED_API_SHOULD_NOT_BE_USED add general coding rules for assertion messages and deprecated APIs Dec 27, 2022
@codecholeric codecholeric merged commit 03935a2 into main Dec 27, 2022
@codecholeric codecholeric deleted the extend-general-coding-rules branch December 27, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can ArchUnit check that assertions include a message?
2 participants