Skip to content

Instantly share code, notes, and snippets.

@andres-sacco
Created January 16, 2021 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andres-sacco/b726106d1e82dda6551884d390bfb3de to your computer and use it in GitHub Desktop.
Save andres-sacco/b726106d1e82dda6551884d390bfb3de to your computer and use it in GitHub Desktop.
General coding
import static com.tngtech.archunit.library.GeneralCodingRules.NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS;
import static com.tngtech.archunit.library.GeneralCodingRules.NO_CLASSES_SHOULD_USE_JODATIME;
import com.tngtech.archunit.core.importer.ImportOption;
import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTest;
import com.tngtech.archunit.lang.ArchRule;
@AnalyzeClasses(packages = "com.example.archunit", importOptions = ImportOption.DoNotIncludeTests.class)
class GeneralCodingRulesTest {
@ArchTest
static final ArchRule no_jodatime = NO_CLASSES_SHOULD_USE_JODATIME;
@ArchTest
static final ArchRule no_generic_exceptions = NO_CLASSES_SHOULD_THROW_GENERIC_EXCEPTIONS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment